aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/gotest.tools/v3/internal/format/format.go
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2024-03-02 11:07:30 -0500
committerGitHub <noreply@github.com>2024-03-02 11:07:30 -0500
commit571bc9bf2efa841b29bf036f4d307664bfbe155d (patch)
tree41fb3a459db99d1f0ec2ed2e00d4ca580a5d0c46 /vendor/gotest.tools/v3/internal/format/format.go
parentUpdate readme (diff)
parentRemove Latest() from migration fs repo in favor of using List on service (diff)
downloadcli-571bc9bf2efa841b29bf036f4d307664bfbe155d.zip
Merge pull request #1 from eugenetriguba/0.3.0
Diffstat (limited to 'vendor/gotest.tools/v3/internal/format/format.go')
-rw-r--r--vendor/gotest.tools/v3/internal/format/format.go27
1 files changed, 0 insertions, 27 deletions
diff --git a/vendor/gotest.tools/v3/internal/format/format.go b/vendor/gotest.tools/v3/internal/format/format.go
deleted file mode 100644
index 5097e4b..0000000
--- a/vendor/gotest.tools/v3/internal/format/format.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package format // import "gotest.tools/v3/internal/format"
-
-import "fmt"
-
-// Message accepts a msgAndArgs varargs and formats it using fmt.Sprintf
-func Message(msgAndArgs ...interface{}) string {
- switch len(msgAndArgs) {
- case 0:
- return ""
- case 1:
- return fmt.Sprintf("%v", msgAndArgs[0])
- default:
- return fmt.Sprintf(msgAndArgs[0].(string), msgAndArgs[1:]...)
- }
-}
-
-// WithCustomMessage accepts one or two messages and formats them appropriately
-func WithCustomMessage(source string, msgAndArgs ...interface{}) string {
- custom := Message(msgAndArgs...)
- switch {
- case custom == "":
- return source
- case source == "":
- return custom
- }
- return fmt.Sprintf("%s: %s", source, custom)
-}