Skip to content

Instantly share code, notes, and snippets.

@joshuarubin
Created July 17, 2016 22:45
Show Gist options
  • Save joshuarubin/0ce4d78458b70a184a112b03e54171a8 to your computer and use it in GitHub Desktop.
Save joshuarubin/0ce4d78458b70a184a112b03e54171a8 to your computer and use it in GitHub Desktop.
hodor4
func process(r io.Reader) (io.Reader, error) {
data, err := ioutil.ReadAll(r)
if err != nil {
return nil, err
}
return strings.NewReader(strings.Replace(string(data), "hodor", "hold the door", -1)), nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment