Skip to content

Adding string vars for commands/subcommands (not a cli) results in a crash  #68

@dnfd

Description

@dnfd
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x4fda8c]

goroutine 1 [running]:
flag.(*FlagSet).Var(0x0, 0x6cddd0, 0xc000059460, 0x6832bc, 0x4, 0x689822, 0x1a)
	/usr/lib/go/src/flag/flag.go:862 +0x10c
flag.(*FlagSet).StringVar(...)
	/usr/lib/go/src/flag/flag.go:760
github.com/openware/pkg/kli.(*Command).StringFlag(0xc0001541b0, 0x6832bc, 0x4, 0x689822, 0x1a, 0xc000059460, 0xc00007b080)
	/home/den/go/pkg/mod/github.com/openware/pkg@v0.0.0-20211005134515-d7a0eb0b3988/kli/command.go:205 +0x6f

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions