gpic

module
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2023 License: MIT

README

gPic Go Module CI Status Go Report Card Software License

gPic is a Go (Golang) module that allows you to generate Avatar URLs easily in your own Go project. This currently support Gravatar and GitHub avatars. GitLab support will be added soon.

Requirements

This Go module is tested with the two most recent minor releases release of Go. Currently this is Go v1.20.

Installation

gPic is a Go module and so the best way to use it is to import it into your own code and then run go mod tidy to get it downloaded.

import(
	"github.com/gopherlibs/gpic/gpic"
)

Usage

package main

import (
	"fmt"

	"github.com/gopherlibs/gpic/gpic"
)

func main() {

	img, err := gpic.NewImage("Ricardo@Feliciano.Tech")
	if err != nil {
		fmt.Println(err)
		return
	}

	imgURL, err := img.URL()
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(imgURL.String())
}

Development

This library is written and tested with Go v1.20+ in mind. go fmt is your friend. Please feel free to open Issues and PRs are you see fit. Any PR that requires a good amount of work or is a significant change, it would be best to open an Issue to discuss the change first.

License & Credits

This module was written by Ricardo N Feliciano (FelicianoTech). This repository is licensed under the MIT license. This repo's license can be found here.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL