MCPcopy
hub / github.com/openai/openai-go / isValidTag

Function isValidTag

internal/encoding/json/encode.go:977–992  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

975}
976
977func isValidTag(s string) bool {
978 if s == "" {
979 return false
980 }
981 for _, c := range s {
982 switch {
983 case strings.ContainsRune("!#$%&()*+-./:;<=>?@[]^_{|}~ ", c):
984 // Backslash and quote chars are reserved, but
985 // otherwise any punctuation chars are allowed
986 // in a tag name.
987 case !unicode.IsLetter(c) && !unicode.IsDigit(c):
988 return false
989 }
990 }
991 return true
992}
993
994func typeByIndex(t reflect.Type, index []int) reflect.Type {
995 for _, i := range index {

Callers 1

typeFieldsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…