Created
July 1, 2016 16:01
-
-
Save cep21/cfb16ed4bf96abc71e641020121ca735 to your computer and use it in GitHub Desktop.
Example supporting default empty struct
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
const DefaultBaseURL = "http://api.smitegame.com/" | |
func (c *Client) urlBase() string { | |
if c.BaseURL == "" { | |
return DefaultBaseURL | |
} | |
return c.BaseURL | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment