Update code style and readme.md

This commit is contained in:
Weilin Shi 2018-04-26 10:03:29 +08:00
parent b204ba9578
commit 1284662a43
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
> Package captcha provides an easy to use, unopinionated API for captcha generation > Package captcha provides an easy to use, unopinionated API for captcha generation.
<div> <div>
@ -42,7 +42,7 @@ func handle(w http.ResponseWriter, r *http.Request) {
## Contributing ## Contributing
If your found a bug, please contribute! If your found a bug, please contribute!
see [contributing.md](contributing.md) for more detail see [contributing.md](contributing.md) for more detail.
## License ## License
[MIT](LICENSE.md) [MIT](LICENSE.md)

View File

@ -258,7 +258,7 @@ func randomInvertColor(base color.Color) color.Color {
hue := float64(rng.Intn(361)) / 360 hue := float64(rng.Intn(361)) / 360
saturation := 0.6 + rng.Float64()*0.2 saturation := 0.6 + rng.Float64()*0.2
return hsva{h: hue, s: saturation, v: value, a: uint8(255)} return hsva{h: hue, s: saturation, v: value, a: 255}
} }
func getLightness(colour color.Color) float64 { func getLightness(colour color.Color) float64 {