updated dependency and formatted code

This commit is contained in:
Daniel Sommer 2023-11-30 14:36:49 +01:00
parent 092f047d14
commit 7f7985b0e9
2 changed files with 2 additions and 2 deletions

2
go.mod
View file

@ -9,5 +9,5 @@ require (
github.com/kennykarnama/color-thief v0.0.0-20230222041546-c1bf65ec0808 github.com/kennykarnama/color-thief v0.0.0-20230222041546-c1bf65ec0808
github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-isatty v0.0.20 // indirect
golang.org/x/sys v0.14.0 // indirect golang.org/x/sys v0.15.0 // indirect
) )

View file

@ -33,7 +33,7 @@ func registerHandlers() {
func serveRandomImageName(writer http.ResponseWriter, request *http.Request) { func serveRandomImageName(writer http.ResponseWriter, request *http.Request) {
timestamp := time.Now().UnixMilli() timestamp := time.Now().UnixMilli()
var response response var response response
response.Content, response.Size, response.error = internal.GetRandomImage() response.Content, response.error = internal.GetRandomImage()
if response.error != nil { if response.error != nil {
response.StatusCode = 404 response.StatusCode = 404
} }