| 1 | package gitscip-go gomod github.com/isacikgoz/gitbatch . `github.com/isacikgoz/gitbatch/internal/git`/ |
| 2 | |
| 3 | import ( |
| 4 | "math/randscip-go gomod github.com/golang/go/src go1.16 `math/rand`/" |
| 5 | "timescip-go gomod github.com/golang/go/src go1.16 time/" |
| 6 | ) |
| 7 | |
| 8 | // RandomString generates a random string of n length |
| 9 | func RandomStringscip-go gomod github.com/isacikgoz/gitbatch . `github.com/isacikgoz/gitbatch/internal/git`/RandomString().(n int) string { |
| 10 | var characterRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") |
| 11 | var r = randscip-go gomod github.com/golang/go/src go1.16 `math/rand`/.Newscip-go gomod github.com/golang/go/src go1.16 `math/rand`/New().(randscip-go gomod github.com/golang/go/src go1.16 `math/rand`/.NewSourcescip-go gomod github.com/golang/go/src go1.16 `math/rand`/NewSource().(timescip-go gomod github.com/golang/go/src go1.16 time/.Nowscip-go gomod github.com/golang/go/src go1.16 time/Now().().UnixNanoscip-go gomod github.com/golang/go/src go1.16 time/Time#UnixNano().())) |
| 12 | b := make([]rune, n) |
| 13 | for i := range b { |
| 14 | b[i] = characterRunes[r.Intnscip-go gomod github.com/golang/go/src go1.16 `math/rand`/Rand#Intn().(len(characterRunes))] |
| 15 | } |
| 16 | return string(b) |
| 17 | } |