hacdias/webdav

panic: interface conversion: interface {} is nil, not bool

Leao9203 opened this issue · 1 comments

Env: Debian 11 amd64
config file: conf.yml.txt

When I run it with

./webdav -c conf.yml

It shows these and exit

panic: interface conversion: interface {} is nil, not bool

goroutine 1 [running]:
github.com/hacdias/webdav/v4/cmd.parseCors(0xc0000da6c0, 0xc00012e090)
github.com/hacdias/webdav/v4/cmd/config.go:141 +0x1f0
github.com/hacdias/webdav/v4/cmd.readConfig(0x7f78e0)
github.com/hacdias/webdav/v4/cmd/config.go:216 +0x41e
github.com/hacdias/webdav/v4/cmd.glob..func1(0xbdf1c0, {0x883d9c, 0x2, 0x2})
github.com/hacdias/webdav/v4/cmd/root.go:56 +0x52
github.com/spf13/cobra.(*Command).execute(0xbdf1c0, {0xc00008c160, 0x2, 0x2})
github.com/spf13/cobra@v1.1.3/command.go:856 +0x5f8
github.com/spf13/cobra.(*Command).ExecuteC(0xbdf1c0)
github.com/spf13/cobra@v1.1.3/command.go:960 +0x3ad
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.1.3/command.go:897
github.com/hacdias/webdav/v4/cmd.Execute()
github.com/hacdias/webdav/v4/cmd/cmd.go:9 +0x25
main.main()
./main.go:8 +0x17

This should be fixed by c125bed.