Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ linters:
- exptostd
#- fatcontext
#- gocritic
#- godot
- godot
- govet
- loggercheck
- misspell
Expand Down
4 changes: 2 additions & 2 deletions config/http_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ type OAuth2 struct {
ProxyConfig `yaml:",inline"`
}

// UnmarshalYAML implements the yaml.Unmarshaler interface
// UnmarshalYAML implements the yaml.Unmarshaler interface.
func (o *OAuth2) UnmarshalYAML(unmarshal func(interface{}) error) error {
type plain OAuth2
if err := unmarshal((*plain)(o)); err != nil {
Expand Down Expand Up @@ -423,7 +423,7 @@ func (c *HTTPClientConfig) Validate() error {
return nil
}

// UnmarshalYAML implements the yaml.Unmarshaler interface
// UnmarshalYAML implements the yaml.Unmarshaler interface.
func (c *HTTPClientConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
type plain HTTPClientConfig
*c = DefaultHTTPClientConfig
Expand Down
2 changes: 1 addition & 1 deletion config/http_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1748,7 +1748,7 @@ func TestUnmarshalEmptyURL(t *testing.T) {
}
}

// checks if u equals to &url.URL{}
// checks if u equals to &url.URL{}.
func isEmptyNonNilURL(u *url.URL) bool {
return u != nil && *u == url.URL{}
}
Expand Down
4 changes: 1 addition & 3 deletions expfmt/expfmt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ import (
"github.com/prometheus/common/model"
)

// Test Format to Escapting Scheme conversion
// Path: expfmt/expfmt_test.go
// Compare this snippet from expfmt/expfmt.go:
// Test Format to Escaping Scheme conversion.
func TestToFormatType(t *testing.T) {
tests := []struct {
format Format
Expand Down
4 changes: 2 additions & 2 deletions model/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ const (
// Accept header, the default NameEscapingScheme will be used.
EscapingKey = "escaping"

// Possible values for Escaping Key:
// Possible values for Escaping Key.
AllowUTF8 = "allow-utf-8" // No escaping required.
EscapeUnderscores = "underscores"
EscapeDots = "dots"
Expand Down Expand Up @@ -470,7 +470,7 @@ func EscapeName(name string, scheme EscapingScheme) string {
}
}

// lower function taken from strconv.atoi
// lower function taken from strconv.atoi.
func lower(c byte) byte {
return c | ('x' - 'X')
}
Expand Down
4 changes: 2 additions & 2 deletions model/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ func (t *Time) UnmarshalJSON(b []byte) error {
// This type should not propagate beyond the scope of input/output processing.
type Duration time.Duration

// Set implements pflag/flag.Value
// Set implements pflag/flag.Value.
func (d *Duration) Set(s string) error {
var err error
*d, err = ParseDuration(s)
return err
}

// Type implements pflag.Value
// Type implements pflag.Value.
func (d *Duration) Type() string {
return "duration"
}
Expand Down
2 changes: 1 addition & 1 deletion promslog/flag/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const FormatFlagName = "log.format"
var FormatFlagHelp = "Output format of log messages. One of: [" + strings.Join(promslog.FormatFlagOptions, ", ") + "]"

// AddFlags adds the flags used by this package to the Kingpin application.
// To use the default Kingpin application, call AddFlags(kingpin.CommandLine)
// To use the default Kingpin application, call AddFlags(kingpin.CommandLine).
func AddFlags(a *kingpin.Application, config *promslog.Config) {
config.Level = promslog.NewLevel()
a.Flag(LevelFlagName, LevelFlagHelp).
Expand Down
2 changes: 1 addition & 1 deletion promslog/slog.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (f *Format) Set(s string) error {
return nil
}

// Config is a struct containing configurable settings for the logger
// Config is a struct containing configurable settings for the logger.
type Config struct {
Level *Level
Format *Format
Expand Down
Loading