github.com/MontFerret/ferret@v0.18.0/pkg/stdlib/testing/base/format.go (about) 1 package base 2 3 import ( 4 "fmt" 5 6 "github.com/MontFerret/ferret/pkg/runtime/core" 7 "github.com/MontFerret/ferret/pkg/runtime/values" 8 ) 9 10 func FormatValue(val core.Value) string { 11 valStr := val.String() 12 13 if val == values.None { 14 valStr = "none" 15 } 16 17 return fmt.Sprintf("[%s] '%s'", val.Type(), valStr) 18 }