Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/sheng/cameron

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/sheng/cameron

  • v1.2.1
  • Source
  • Go
  • Socket score

Version published
Created
Source

Cameron

GitHub Actions codecov Go Report Card PkgGoDev

An avatar generator for Go.

Oh, by the way, the name of this project came from the Avatar's director James Cameron.

Features

  • Identicon

Installation

Open your terminal and execute

$ go get github.com/aofei/cameron

done.

The only requirement is the Go, at least v1.13.

Quick Start

Create a file named cameron.go

package main

import (
	"bytes"
	"image/png"
	"net/http"

	"github.com/aofei/cameron"
)

func main() {
	http.ListenAndServe("localhost:8080", http.HandlerFunc(identicon))
}

func identicon(rw http.ResponseWriter, req *http.Request) {
	buf := bytes.Buffer{}
	png.Encode(&buf, cameron.Identicon([]byte(req.RequestURI), 540, 60))
	rw.Header().Set("Content-Type", "image/png")
	buf.WriteTo(rw)
}

and run it

$ go run cameron.go

then visit http://localhost:8080 with different paths.

Community

If you want to discuss Cameron, or ask questions about it, simply post questions or ideas here.

Contributing

If you want to help build Cameron, simply follow this to send pull requests here.

TODOs

  • Add support for cartoon avatar
  • Add support for simulation avatar

License

This project is licensed under the MIT License.

License can be found here.

FAQs

Package last updated on 03 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc