Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

fix(lint): remove naked returns

Gabe Kangas027a9219e348
diff --git a/utils/utils.go b/utils/utils.go
index 99d13c3123..df37e6a959 100644
--- a/utils/utils.go
+++ b/utils/utils.go
@@ -376,18 +376,18 @@ func DecodeBase64Image(url string) (bytes []byte, extension string, err error) {
s := strings.SplitN(url, ",", 2)
if len(s) < 2 {
err = errors.New("error splitting base64 image data")
- return
+ return nil, "", err
}
bytes, err = base64.StdEncoding.DecodeString(s[1])
if err != nil {
- return
+ return nil, "", err
}
splitHeader := strings.Split(s[0], ":")
if len(splitHeader) < 2 {
err = errors.New("error splitting base64 image header")
- return
+ return nil, "", err
}
contentType := strings.Split(splitHeader[1], ";")[0]
@@ -404,7 +404,7 @@ func DecodeBase64Image(url string) (bytes []byte, extension string, err error) {
if extension == "" {
err = errors.New("missing or invalid contentType in base64 image")
- return
+ return nil, "", err
}
return bytes, extension, nil