-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97df944
commit a3044b1
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,26 +42,26 @@ Prebuilt [binary packages](https://github.com/o1egl/govatar/releases) are availa | |
## Usage | ||
|
||
```bash | ||
$ govatar generate male -o avatar.png # Generates random avatar.png for male | ||
$ govatar generate female -o avatar.png # Generates random avatar.png for female | ||
$ govatar generate male -u [email protected] -o avatar.png # Generates avatar.png for specified username | ||
$ govatar -h # Display help message | ||
$ govatar generate male -o avatar.png # Generates random avatar.png for male | ||
$ govatar generate female -o avatar.png # Generates random avatar.png for female | ||
$ govatar generate male -u [email protected] -o avatar.png # Generates avatar.png for specified username | ||
$ govatar -h # Display help message | ||
``` | ||
|
||
#### As lib | ||
|
||
Generates avatar and save it to filePath | ||
|
||
```go | ||
err := govatar.GenerateFile(govatar.MALE, "/path/to/avatar.jpg" | ||
err := govatar.GenerateFileFromUsername(govatar.MALE, "username", "/path/to/avatar.jpg") | ||
err := govatar.GenerateFile(govatar.MALE, "/path/to/avatar.jpg") | ||
err := govatar.GenerateFileFromUsername(govatar.MALE, "username", "/path/to/avatar.jpg") | ||
```` | ||
|
||
Generates an avatar and returns it as an image.Image | ||
|
||
```go | ||
img, err := govatar.Generate(govatar.MALE) | ||
img, err := govatar.GenerateForUsername(govatar.MALE, "username") | ||
img, err := govatar.Generate(govatar.MALE) | ||
img, err := govatar.GenerateForUsername(govatar.MALE, "username") | ||
```` | ||
|