this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

lexicon: make parsed token FullName public

+5 -5
+5 -5
atproto/lexicon/language.go
··· 970 970 type SchemaToken struct { 971 971 Type string `json:"type"` // "token" 972 972 Description *string `json:"description,omitempty"` 973 - // the fully-qualified identifier of this token 974 - fullName string 973 + // the fully-qualified identifier of this token. this is not included in the schema file; it must be added when parsing 974 + FullName string `json:"-"` 975 975 } 976 976 977 977 func (s *SchemaToken) CheckSchema() error { 978 - if s.fullName == "" { 978 + if s.FullName == "" { 979 979 return fmt.Errorf("expected fully-qualified token name") 980 980 } 981 981 return nil ··· 986 986 if !ok { 987 987 return fmt.Errorf("expected a string for token, got: %s", reflect.TypeOf(d)) 988 988 } 989 - if s.fullName == "" { 989 + if s.FullName == "" { 990 990 return fmt.Errorf("token name was not populated at parse time") 991 991 } 992 - if str != s.fullName { 992 + if str != s.FullName { 993 993 return fmt.Errorf("token name did not match expected: %s", str) 994 994 } 995 995 return nil