WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
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/[email protected]/kli/command.go:205 +0x6f

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions