Skip to content

go-factory/banny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

banny

What's banny?

banny is an identicon generator, here is an introduction about what is identicon.

How to use?

Get this library:

go get github.com/go-factory/banny

Generate identicon, support ip analysis and email analysis, you can generate it in your own project directory just like this:

fi, err := os.Create("logo.png")
if err != nil {
  log.Fatal(err)
}
defer fi.Close()

png.Encode(fi, banny.Config.Generate(240, ""))
png.Encode(fi, banny.Config.Generate(240, "124.2.45.230"))
png.Encode(fi, banny.Config.Generate(240, "zztcc@foxmail.com"))

Output:
Input is neither an ip address nor email address, use local ip address instead.
This is an ip address 124.2.45.230
This is an email zztcc@foxmail.com