Skip to content

Commit ceb9ca6

Browse files
authored
chore: unnecessary use of fmt.Sprintf (#677)
Signed-off-by: guoguangwu <[email protected]>
1 parent a2087d8 commit ceb9ca6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

matchers/be_a_directory.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ func (matcher *BeADirectoryMatcher) FailureMessage(actual interface{}) (message
5252
}
5353

5454
func (matcher *BeADirectoryMatcher) NegatedFailureMessage(actual interface{}) (message string) {
55-
return format.Message(actual, fmt.Sprintf("not be a directory"))
55+
return format.Message(actual, "not be a directory")
5656
}

matchers/be_a_regular_file.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ func (matcher *BeARegularFileMatcher) FailureMessage(actual interface{}) (messag
5252
}
5353

5454
func (matcher *BeARegularFileMatcher) NegatedFailureMessage(actual interface{}) (message string) {
55-
return format.Message(actual, fmt.Sprintf("not be a regular file"))
55+
return format.Message(actual, "not be a regular file")
5656
}

matchers/be_an_existing_file.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ func (matcher *BeAnExistingFileMatcher) Match(actual interface{}) (success bool,
3232
}
3333

3434
func (matcher *BeAnExistingFileMatcher) FailureMessage(actual interface{}) (message string) {
35-
return format.Message(actual, fmt.Sprintf("to exist"))
35+
return format.Message(actual, "to exist")
3636
}
3737

3838
func (matcher *BeAnExistingFileMatcher) NegatedFailureMessage(actual interface{}) (message string) {
39-
return format.Message(actual, fmt.Sprintf("not to exist"))
39+
return format.Message(actual, "not to exist")
4040
}

0 commit comments

Comments
 (0)