Skip to content

Instantly share code, notes, and snippets.

@KEINOS
Last active April 16, 2022 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KEINOS/d5b9800c636dd78defa4f15894d54d29 to your computer and use it in GitHub Desktop.
Save KEINOS/d5b9800c636dd78defa4f15894d54d29 to your computer and use it in GitHub Desktop.
[Golang] Gist is a git. Thus, it can be used in "import" of Go. See in action: https://go.dev/play/p/3W-F9T113d_f @ Go Playground
// To see how to use this gist: https://go.dev/play/p/3W-F9T113d_f @ Go Playground
// Ref: https://qiita.com/mattn/items/6cad7b5dd73092b3d354 by @mattn @ Qiita
package nurupo
import (
"errors"
"strings"
)
// Nurupo returns an error if the message contains "ぬるぽ".
func Nurupo(message string) error {
if strings.Contains(message, "ぬるぽ") {
return errors.New("ガッ")
}
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment