Last active
April 16, 2022 06:08
-
-
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
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
// 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