Created
June 25, 2017 02:54
-
-
Save bscott/f98efaf15993d21df091e700579c867b to your computer and use it in GitHub Desktop.
Go Func's
This file contains hidden or 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
| // my own helper functions | |
| func trimQuotes(s string) string { | |
| if len(s) >= 2 { | |
| if s[0] == '"' && s[len(s)-1] == '"' { | |
| return s[1 : len(s)-1] | |
| } | |
| } | |
| return s | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment