You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
224 B

7 years ago
7 years ago
  1. package main
  2. import (
  3. "fmt"
  4. "net/http"
  5. )
  6. func check(err error) {
  7. if err != nil {
  8. fmt.Println(err)
  9. }
  10. }
  11. func checkAndReturn(err error, w http.ResponseWriter, msg string) {
  12. if err != nil {
  13. fmt.Fprintln(w, msg)
  14. }
  15. }