MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / printf

Function printf

driver/badger/util.go:11–26  ·  view source on GitHub ↗
(tpl string, args ...any)

Source from the content-addressed store, hash-verified

9)
10
11func printf(tpl string, args ...any) {
12 newArgs := make([]any, 0, len(args))
13 for _, arg := range args {
14 var newArg any
15 switch v := arg.(type) {
16 case string:
17 newArg = strings.TrimSpace(v)
18 case []byte:
19 newArg = strings.TrimSpace(string(v))
20 default:
21 newArg = arg
22 }
23 newArgs = append(newArgs, newArg)
24 }
25 log.Println(fmt.Sprintf(tpl, newArgs...))
26}
27
28func timeTs() uint64 {
29 return uint64(time.Now().UnixNano())

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected