uiavatars

package module
v0.0.0-...-6238b33 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-ui-avatars

Getting Started

The project is a Go library designed to create UI avatars from user names by producing SVG images that can be integrated into applications. It is inspired by ui-avatars.com, which generates simple avatars based on user initials.

Language support

  • Thai
  • English

Features

  • Random background color

Example

Here's a result by using this library.

getInitials(fullname)

Explanation

  • getInitials Function:
    • Takes a string (e.g., "Test@gmail.com").
    • Extracts the first letter of each word in the string.
input:
Test@gmail.com
Output:
TE

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateImage

func GenerateImage(name string) []byte

GenerateImage creates an SVG image and returns its content as a base64 string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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