Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#1517 from saschagrunert/goprintffu…
Browse files Browse the repository at this point in the history
…ncname

Fix `goprintffuncname` linter
  • Loading branch information
k8s-ci-robot authored Jul 23, 2024
2 parents 7002687 + d40d56b commit d13cbf0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ linters:
- goimports
- gomoddirectives
- gomodguard
- goprintffuncname
- gosmopolitan
- govet
- grouper
Expand Down Expand Up @@ -91,7 +92,6 @@ linters:
# - goconst
# - gocyclo
# - godox
# - goprintffuncname
# - gosec
# - gosimple
# - ireturn
Expand Down
6 changes: 3 additions & 3 deletions pkg/framework/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,19 +160,19 @@ func nowStamp() string {
return time.Now().Format(time.StampMilli)
}

func log(level string, format string, args ...interface{}) {
func logf(level string, format string, args ...interface{}) {
fmt.Fprintf(GinkgoWriter, nowStamp()+": "+level+": "+format+"\n", args...)
}

// Logf prints a info message.
func Logf(format string, args ...interface{}) {
log("INFO", format, args...)
logf("INFO", format, args...)
}

// Failf prints an error message.
func Failf(format string, args ...interface{}) {
msg := fmt.Sprintf(format, args...)
log("INFO", msg)
logf("INFO", msg)
Fail(nowStamp()+": "+msg, 1)
}

Expand Down

0 comments on commit d13cbf0

Please sign in to comment.