Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix merge error caused by 2fa63cf #1912

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

KKKIIO
Copy link
Contributor

@KKKIIO KKKIIO commented Oct 23, 2024

Describe the PR
Remove duplicate templateDelimsFlag added by merge 2fa63cf

@ubogdan
Copy link
Contributor

ubogdan commented Oct 23, 2024

why ?

@KKKIIO
Copy link
Contributor Author

KKKIIO commented Oct 24, 2024

Executing swag init causes panic. We already have the templateDelimsFlag defined right below the delete code.

@KKKIIO ➜ /workspaces/swag/example/basic (2fa63cf) $ swag init -v3.1
Swag version:  v2.0.0
init flag redefined: templateDelims
panic: init flag redefined: templateDelims

goroutine 1 [running]:
flag.(*FlagSet).Var(0xc000214690, {0xc28af0, 0xc0001c18f0}, {0xc000222562, 0xe}, {0xb5bcc7, 0x6e})
        /usr/local/go/src/flag/flag.go:1028 +0x37d
flag.(*FlagSet).StringVar(...)
        /usr/local/go/src/flag/flag.go:879
flag.(*FlagSet).String(0xc000214690, {0xc000222562, 0xe}, {0x0, 0x0}, {0xb5bcc7, 0x6e})
        /usr/local/go/src/flag/flag.go:892 +0xa5
github.com/urfave/cli/v2.(*StringFlag).Apply(0x1060b60, 0xc000214690)
        /go/pkg/mod/github.com/urfave/cli/[email protected]/flag_string.go:60 +0x179
github.com/urfave/cli/v2.flagSet({0xb2ce63, 0x4}, {0xc000210808, 0x1e, 0xc000126b10?}, {{0x0?, 0x0?}, 0x0?, 0x0?})
        /go/pkg/mod/github.com/urfave/cli/[email protected]/flag.go:177 +0x16c
github.com/urfave/cli/v2.(*Command).newFlagSet(...)
        /go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:281
github.com/urfave/cli/v2.(*Command).parseFlags(0xc0002122c0, {0xc2ef00, 0xc000126b10}, 0x0)
        /go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:314 +0x7b
github.com/urfave/cli/v2.(*Command).Run(0xc0002122c0, 0xc000218180, {0xc00013d200, 0x2, 0x2})
        /go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:155 +0xd8
github.com/urfave/cli/v2.(*Command).Run(0xc0002126e0, 0xc000218040, {0xc000116450, 0x3, 0x3})
        /go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:267 +0xa25
github.com/urfave/cli/v2.(*App).RunContext(0xc000216000, {0xc2cbb8, 0x108dac0}, {0xc000116450, 0x3, 0x3})
        /go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:332 +0x566
github.com/urfave/cli/v2.(*App).Run(...)
        /go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:309
main.main()
        /workspaces/swag/cmd/swag/main.go:347 +0x5d8

@ubogdan
Copy link
Contributor

ubogdan commented Oct 24, 2024

Ok, I got it!

Thanks for fixing!

@ubogdan ubogdan merged commit ef38f54 into swaggo:v2 Oct 24, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants