arnaucube
arnaucube/galdricPublic Self-hosted repository
galdric/errors.go
errors.goRaw
 1package main
 2
 3import (
 4	"fmt"
 5	"net/http"
 6)
 7
 8func check(err error) {
 9	if err != nil {
10		fmt.Println(err)
11	}
12}
13
14func checkAndReturn(err error, w http.ResponseWriter, msg string) {
15	if err != nil {
16		fmt.Fprintln(w, msg)
17	}
18}