You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-11-27 22:49:15 +02:00
chore: enable gocritic linter (#7095)
#### Description Enable and fixes several rules from [gocritic](https://golangci-lint.run/usage/linters/#gocritic) linter --------- Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
@@ -68,7 +68,7 @@ func parseOSReleaseFile(file io.Reader) map[string]string {
|
||||
func skip(line string) bool {
|
||||
line = strings.TrimSpace(line)
|
||||
|
||||
return len(line) == 0 || strings.HasPrefix(line, "#")
|
||||
return line == "" || strings.HasPrefix(line, "#")
|
||||
}
|
||||
|
||||
// parse attempts to split the provided line on the first '=' character, and then
|
||||
@@ -76,7 +76,7 @@ func skip(line string) bool {
|
||||
func parse(line string) (string, string, bool) {
|
||||
k, v, found := strings.Cut(line, "=")
|
||||
|
||||
if !found || len(k) == 0 {
|
||||
if !found || k == "" {
|
||||
return "", "", false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user