Skip to content

Conversation

@ipsegs
Copy link

@ipsegs ipsegs commented Jul 15, 2023

fix for panic error while using the jamctl get command.

fix for panic error while using the jamctl get command.
@ipsegs
Copy link
Author

ipsegs commented Jul 15, 2023

Getting this error while testing the jamctl get command:
panic: runtime error: slice bounds out of range [:9341] with length 9340

goroutine 1 [running]:
github.com/b-nova-techhub/jamctl/pkg/util.SubstringBetween({0xc00001aa00, 0x247c}, {0xc0001a5b70?, 0x10}, {0xc0001a5b50, 0x11})
/mnt/c/Users/SegunAdebayo/Downloads/test/jamctl/pkg/util/string.go:25 +0x19f
github.com/b-nova-techhub/jamctl/pkg/gen.getHeader({0xc00001aa00, 0x247c})
/mnt/c/Users/SegunAdebayo/Downloads/test/jamctl/pkg/gen/gen.go:52 +0x118
github.com/b-nova-techhub/jamctl/pkg/gen.getFrontMatter({0xc00001aa00?, 0x7f1eca030108?})
/mnt/c/Users/SegunAdebayo/Downloads/test/jamctl/pkg/gen/gen.go:47 +0x1e
github.com/b-nova-techhub/jamctl/pkg/gen.Generate({0xc000037d80, 0x3, 0xc000178f00?})
/mnt/c/Users/SegunAdebayo/Downloads/test/jamctl/pkg/gen/gen.go:29 +0xdd
github.com/b-nova-techhub/jamctl/cmd.get(0xef0720?, {0xc000169230?, 0x1?, 0x1?})
/mnt/c/Users/SegunAdebayo/Downloads/test/jamctl/cmd/get.go:25 +0x36
github.com/spf13/cobra.(*Command).execute(0xef0720, {0xc000169200, 0x1, 0x1})
/home/shegedo/Projects/goproj/pkg/mod/github.com/spf13/[email protected]/command.go:863 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0xef0480)
/home/shegedo/Projects/goproj/pkg/mod/github.com/spf13/[email protected]/command.go:977 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
/home/shegedo/Projects/goproj/pkg/mod/github.com/spf13/[email protected]/command.go:905
github.com/b-nova-techhub/jamctl/cmd.Execute(...)
/mnt/c/Users/SegunAdebayo/Downloads/test/jamctl/cmd/cmd.go:24
main.main()
/mnt/c/Users/SegunAdebayo/Downloads/test/jamctl/main.go:9 +0x25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant