samples icon indicating copy to clipboard operation
samples copied to clipboard

请问大神这里为什么要减1呢?感觉这里写的太繁琐了

Open Lcoderfit opened this issue 6 years ago • 1 comments

https://github.com/beego/samples/blob/1c696ee4905b2b12edf7d7dc451220bc838c1296/shorturl/models/model.go#L40

Lcoderfit avatar Dec 10 '19 03:12 Lcoderfit

for num > 0 {
	runes = append(runes, alpha[num%62])
	num = num / 62
}

Lcoderfit avatar Dec 10 '19 03:12 Lcoderfit