2018-04-26 11:53:03 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2018-12-27 14:37:44 +00:00
|
|
|
"net/http"
|
2018-04-26 11:53:03 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func addStringIfUnique(st string, sl []string) []string {
|
|
|
|
for i := range sl {
|
|
|
|
if sl[i] == st {
|
|
|
|
return sl
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return append(sl, st)
|
|
|
|
}
|
2018-12-27 14:37:44 +00:00
|
|
|
|
|
|
|
func userError(w http.ResponseWriter) {
|
|
|
|
http.Error(w, "You did a bad", 400)
|
|
|
|
}
|
|
|
|
|
|
|
|
func serverError(w http.ResponseWriter) {
|
|
|
|
http.Error(w, "I did a bad", 500)
|
|
|
|
}
|