Simple go library for creating gravatar.com avatar URLs
Current version: 0.4.0
This library has some inspiration from the eefret/gravatar Go library and the node-gravatar Node.js library.
- Overview
- Installation - Getting this package ready to roll
- Usage - How to use this thing
- License - Licensing information
- Contact - How to contact me
Just like any other Go package, you can install this baby with go get ...
go get github.com/Ascendings/gravago
Now for the fun stuff... the meat! Seriously, though, this package isn't designed to be too difficult to use in a web application - just create a new instance, fiddle some options, then generate your URL!
For example:
// of course we need to import this package
import "github.com/Ascendings/gravago"
// create a new instance
grav := gravago.New(gravago.GravatarOptions{
ForceHTTPS: true,
IconSet: "mosterid",
IconRating: "x",
IconSize: 80,
})
// change some options later on...
grav.SetSize(80) // set the icon size to 80
grav.SetIcons("monsterid") // use monsterid default icons
grav.SetRating("x") // allow x-rated icons
grav.UseHTTPS(true) // force HTTPS
// generate URL
gravURL := grav.URL("[email protected]")
Feel free to fork this repository and submit a PR. Any and all help is welcome!
This package/program is licensed under the 2-Clause BSD License
Email me at: [email protected]
Feel free to hit me up at: