Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title case panic #30

Open
arran4 opened this issue Dec 11, 2024 · 0 comments
Open

Title case panic #30

arran4 opened this issue Dec 11, 2024 · 0 comments

Comments

@arran4
Copy link

arran4 commented Dec 11, 2024

Describe the bug

In my tool: (Obviously not your concern see "reproduce")
https://github.com/arran4/rntocase

During the -help I get the following panic

Conversion Examples:
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/gobeam/stringy.(*input).Title(0x0?)
	/home/arran/.go/path/pkg/mod/github.com/gobeam/[email protected]/stringy.go:368 +0x17f
main.main.func5({0x6a203f?, 0xc000259ce0?})
	/home/arran/Documents/Projects/rntocase/cmd/rntotitle/main.go:45 +0x2d
main.main.func6.2(0xc0002f8100)
	/home/arran/Documents/Projects/rntocase/cmd/rntotitle/main.go:78 +0xd8
slices.AppendSeq[...]({0x0, 0x0, 0x0}, 0xc002a05ae0)
	/usr/lib/go/src/slices/iter.go:50 +0xec
slices.Collect[...](...)
	/usr/lib/go/src/slices/iter.go:58
main.main.func6()
	/home/arran/Documents/Projects/rntocase/cmd/rntotitle/main.go:74 +0x5a5
main.main()
	/home/arran/Documents/Projects/rntocase/cmd/rntotitle/main.go:98 +0x3b3
exit status 2

To Reproduce

stringy.New("   leading spaces").Title()

Expected behavior

TItle case response

Screenshots

N/A

Additional context

N/A

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

No branches or pull requests

1 participant