mirror of
https://github.com/42wim/matterbridge.git
synced 2025-01-31 22:44:24 +01:00
26 lines
381 B
Go
26 lines
381 B
Go
|
//go:build !tinygo
|
||
|
// +build !tinygo
|
||
|
|
||
|
package msgp
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"strconv"
|
||
|
)
|
||
|
|
||
|
// ctxString converts the incoming interface{} slice into a single string.
|
||
|
func ctxString(ctx []interface{}) string {
|
||
|
out := ""
|
||
|
for idx, cv := range ctx {
|
||
|
if idx > 0 {
|
||
|
out += "/"
|
||
|
}
|
||
|
out += fmt.Sprintf("%v", cv)
|
||
|
}
|
||
|
return out
|
||
|
}
|
||
|
|
||
|
func quoteStr(s string) string {
|
||
|
return strconv.Quote(s)
|
||
|
}
|