Gofmt; make capgensound produce gofmt'ed output.
Dmitry Chestnykh dmitry@codingrobots.com
Mon, 12 May 2014 14:40:09 +0200
4 files changed,
5 insertions(+),
6 deletions(-)
M
capgensounds/main.go
→
capgensounds/main.go
@@ -57,7 +57,7 @@ fmt.Fprintf(pcm, "}\n")
} func writeDigitSounds(pcm io.Writer, lang string) { - fmt.Fprintf(pcm, "\t\"%s\" : [][]byte{\n", lang) + fmt.Fprintf(pcm, "\t\"%s\": [][]byte{\n", lang) for i := 0; i <= 9; i++ { fmt.Fprintf(pcm, "\t\t{ // %d\n\t\t\t", i) writeFileRep(pcm, filepath.Join(lang, fmt.Sprintf("%d.wav", i)), "\t\t\t")
M
captcha.go
→
captcha.go
@@ -128,7 +128,7 @@ }
// Verify returns true if the given digits are the ones that were used to // create the given captcha id. -// +// // The function deletes the captcha with the given id from the internal // storage, so that the same captcha can't be verified anymore. func Verify(id string, digits []byte) bool {
M
sounds.go
→
sounds.go
@@ -12,7 +12,7 @@
// Byte slices contain raw 8 kHz unsigned 8-bit PCM data (without wav header). var digitSounds = map[string][][]byte{ - "en" : [][]byte{ + "en": [][]byte{ { // 0 0x80, 0x7f, 0x80, 0x7f, 0x80, 0x80, 0x80, 0x7f, 0x80, 0x7f, 0x80, 0x7f, 0x80, 0x7f, 0x80, 0x7f, 0x80, 0x7f, 0x80, 0x80, 0x7f, 0x80,@@ -2142,7 +2142,7 @@ 0x80, 0x7f, 0x80, 0x7f, 0x80, 0x80, 0x80, 0x7f, 0x80, 0x7f, 0x80,
0x80, 0x7f, 0x80, 0x7f, 0x80, 0x80, 0x7f, 0x80, 0x7f, }, }, - "ru" : [][]byte{ + "ru": [][]byte{ { // 0 0x7f, 0x7f, 0x7e, 0x7f, 0x7f, 0x7e, 0x7f, 0x7e, 0x7f, 0x7f, 0x7e, 0x7f, 0x7e, 0x7f, 0x7d, 0x7e, 0x7d, 0x7e, 0x7e, 0x7e, 0x7d, 0x7e,@@ -4607,7 +4607,7 @@ 0x7f, 0x7e, 0x80, 0x7f, 0x7f, 0x80, 0x7f, 0x80, 0x80, 0x7f, 0x80,
0x80, 0x7f, 0x80, 0x80, 0x7f, 0x80, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, }, }, - "zh" : [][]byte{ + "zh": [][]byte{ { // 0 0x7f, 0x80, 0x7f, 0x80, 0x80, 0x7f, 0x80, 0x7f, 0x80, 0x7f, 0x80, 0x7f, 0x80, 0x7f, 0x7f, 0x80, 0x7f, 0x80, 0x7f, 0x80, 0x7f, 0x80,
M
store_test.go
→
store_test.go
@@ -61,7 +61,6 @@ t.Errorf("= not collected %d out of %d captchas", nc, len(ids))
} } - func BenchmarkSetCollect(b *testing.B) { b.StopTimer() d := RandomDigits(10)