MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / GetJsonTag

Function GetJsonTag

pkg/util/utilfn/utilfn.go:891–901  ·  view source on GitHub ↗
(field reflect.StructField)

Source from the content-addressed store, hash-verified

889}
890
891func GetJsonTag(field reflect.StructField) string {
892 jsonTag := field.Tag.Get("json")
893 if jsonTag == "" {
894 return ""
895 }
896 commaIdx := strings.Index(jsonTag, ",")
897 if commaIdx != -1 {
898 jsonTag = jsonTag[:commaIdx]
899 }
900 return jsonTag
901}
902
903func WriteFileIfDifferent(fileName string, contents []byte) (bool, error) {
904 oldContents, err := os.ReadFile(fileName)

Callers 6

ReadFullConfigFunction · 0.92
GetConfigSubdirsFunction · 0.92
getConfigKeyTypeFunction · 0.92
getTSFieldNameFunction · 0.92
RegisterTypeFunction · 0.92
GenerateMetaMapConstsFunction · 0.92

Calls 1

GetMethod · 0.45

Tested by

no test coverage detected