Skip to content

Commit fcbf9ec

Browse files
committed
✨ feat(fmt): update F function to return format string when no args are provided
1 parent 267f5f0 commit fcbf9ec

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

helpers.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ func GetType(myvar interface{}) string {
121121

122122
// F : fmt.Sprintf
123123
func F(format string, args ...interface{}) string {
124-
return fmt.Sprintf(format, args...)
124+
if len(args) > 0 {
125+
return fmt.Sprintf(format, args...)
126+
}
127+
return format
125128
}
126129

127130
// M : return map[string]interface from args

0 commit comments

Comments
 (0)