goTag limitation
- Vorherrschende Sprache
- Go
- Sterne
- 10.8k
- Forks
- 1.3k
- Ø Merge
- 2 T. 36 Min.
- Gemergte PRs (30 T.)
- 26
Beschreibung
Hello !
I am new using gqlgen, thanks for this project.
While playing with I am hitting some limitation regarding `goTag` usage.
Having this simple schema :
```
type License {
description: String!
@goTag(key: "json", value: "description")
@goTag(
key: "doc"
value: "Detailed description of the license capabilities and restrictions"
)
@goTag(key: "example", value: "This license provides access to all enterprise features including advanced analytics, priority support, and unlimited users")
@goTag(key: "maxLength", value: "500")
version: String!
@goTag(key: "json", value: "version")
@goTag(key: "doc", value: "Version of the license (e.g., 1)")
@goTag(key: "example", value: "1")
}
```
I got the two error when use generate command :
```
panic: tag value should not contain any leading or trailing spaces: "This license provides access to all enterprise features including advanced analytics, priority support, and unlimited users"
goroutine 1 [running]:
github.com/99designs/gqlgen/plugin/modelgen.removeDuplicateTags({0x140001d0240, 0x103})
/Users/tomflenner/golang/pkg/mod/github.com/99designs/gqlgen@v0.17.84/plugin/modelgen/models.go:698 +0x47c
github.com/99designs/gqlgen/plugin/modelgen.GoTagFieldHook(0x14000c514a0?, 0x14000441680, 0x140009162a0)
```
```
panic: tag value should not contain any leading or trailing spaces: "Version of the license (e.g., 1)"
goroutine 1 [running]:
github.com/99designs/gqlgen/plugin/modelgen.removeDuplicateTags({0x14000d869b0, 0x50})
/Users/tomflenner/golang/pkg/mod/github.com/99designs/gqlgen@v0.17.84/plugin/modelgen/models.go:698 +0x47c
github.com/99designs/gqlgen/plugin/modelgen.GoTagFieldHook(0x14000d177e0?, 0x14000412f00, 0x140008d97a0)
/Users/tomflenner/golang/pkg/mod/github.com/99designs/gqlgen@v0.17.84/plugin/modelgen/models.go:605 +0x41c
```
I am wondering is there is such limitation regarding the length of value OR special character ?
Thanks in advance !
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.