Last active
January 26, 2019 11:16
-
-
Save heppu/02d725ba38ed87bdfc0cb6d77c7975f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type storage struct{} | |
func (s *storage) Add(k, v string) {} | |
var s = NewSafeStorage(&storage{}) | |
func handleAdd(w http.ResponseWriter, r *http.Request) { | |
key := r.Host | |
value := r.Method | |
s.Add(key, value) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment