Last active
January 21, 2019 19:55
-
-
Save shanev/16b20f164b78a335d6917dc230602a14 to your computer and use it in GitHub Desktop.
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
// Finds a Profile by the given username | |
func (c *Client) ProfileByUsername(username string) (Profile, error) { | |
profile := new(Profile) | |
err := c.Model(profile).Where("username = ?", username).Select() | |
if err != nil { | |
return *profile, err | |
} | |
return *profile, nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment