alecthomas / kong

Kong is a command-line parser for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

type `filecontent` not read file

artemklevtsov opened this issue · comments

Hi,

I tried to parse the following struct

type CLI struct {
	File []byte `type:"filecontent"`
}

But I got the following error:

panic: --file: expected a valid 8 bit uint but got "/tmp/1887157628"

To reproduce: https://go.dev/play/p/Z9zJWxBh7w4