Failed to write template to new note, but it should exist for you.
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x1102e19]
goroutine 1 [running]:
text/template.errRecover(0xc000117ba0)
/usr/local/go/src/text/template/exec.go:163 +0x15b
panic({0x12aee20, 0x152e290})
/usr/local/go/src/runtime/panic.go:1038 +0x215
text/template.(*Template).execute(0x0, {0x135a440, 0xc0000ae0c8}, {0x12b2740, 0x156dd80})
/usr/local/go/src/text/template/exec.go:214 +0x239
text/template.(*Template).Execute(...)
/usr/local/go/src/text/template/exec.go:200
github.com/gsilvapt/pmz/cmd.writeToNewNote(0xc0000b4198, {0x0, 0x0})
/Users/<username>/go/pkg/mod/github.com/gsilvapt/[email protected]/cmd/new.go:90 +0xf1
github.com/gsilvapt/pmz/cmd.glob..func1(0x1534c00, {0x12ec824, 0x0, 0x0})
/Users/<username>/go/pkg/mod/github.com/gsilvapt/[email protected]/cmd/new.go:52 +0x354
github.com/spf13/cobra.(*Command).execute(0x1534c00, {0x156c970, 0x0, 0x0})
/Users/<username>/go/pkg/mod/github.com/spf13/[email protected]/command.go:860 +0x5f8
github.com/spf13/cobra.(*Command).ExecuteC(0x1534e80)
/Users/<username>/go/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
/Users/<username>/go/pkg/mod/github.com/spf13/[email protected]/command.go:902
github.com/gsilvapt/pmz/cmd.Execute()
/Users/<username>/go/pkg/mod/github.com/gsilvapt/[email protected]/cmd/root.go:50 +0x25
main.main()
/Users/<username>/go/pkg/mod/github.com/gsilvapt/[email protected]/main.go:21 +0x17