bug of toInt toInt32 toInt64
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4k
- Forks
- 337
- Avg merge
- 15m
- Merged PRs (30d)
- 1
Description
a := []string{"01", "02", "03", "04", "05", "06", "07", "08", "09"}
for _, v := range a {
fmt.Println(cast.ToInt64(v))
}
// output 1 2 3 4 5 6 7 0 0
// bug 08 => 0 09 =>0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the implementations of cast.ToInt, cast.ToInt32, and cast.ToInt64, then run the reported Go example to reproduce the handling of 08 and 09. Done means these inputs return 8 and 9 consistently, with regression coverage for the reported cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100