Skip to content

Commit c2c1758

Browse files
committed
refactor: new package name
1 parent 243ed08 commit c2c1758

File tree

8 files changed

+40
-43
lines changed

8 files changed

+40
-43
lines changed

LICENSE

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
1-
Package letteravatar: Copyright 2023-now TNB, The MIT License.
1+
The MIT License (MIT)
22

3-
The MIT License (MIT)
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.
2220

2321

2422
Package letteravatar: Copyright 2016 Grigory Dryapak, The MIT License.

README.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
# letteravatar
1+
# initials
22

3-
[![GoDoc](https://godoc.org/github.com/tnb-labs/letteravatar/v2?status.svg)](https://godoc.org/github.com/tnb-labs/letteravatar/v2)
4-
[![Go](https://img.shields.io/github/go-mod/go-version/tnb-labs/letteravatar)](https://go.dev/)
5-
[![Release](https://img.shields.io/github/release/tnb-labs/letteravatar.svg)](https://github.com/tnb-labs/letteravatar/releases)
6-
[![Test](https://github.com/tnb-labs/letteravatar/actions/workflows/test.yml/badge.svg)](https://github.com/tnb-labs/letteravatar/actions)
7-
[![Report Card](https://goreportcard.com/badge/github.com/tnb-labs/letteravatar/v2)](https://goreportcard.com/report/github.com/tnb-labs/letteravatar/v2)
8-
[![License](https://img.shields.io/github/license/tnb-labs/letteravatar)](https://mit-license.org/)
3+
[![GoDoc](https://godoc.org/github.com/weavatar/initials?status.svg)](https://godoc.org/github.com/weavatar/initials)
4+
[![Go](https://img.shields.io/github/go-mod/go-version/weavatar/initials)](https://go.dev/)
5+
[![Release](https://img.shields.io/github/release/weavatar/initials.svg)](https://github.com/weavatar/initials/releases)
6+
[![Test](https://github.com/weavatar/initials/actions/workflows/test.yml/badge.svg)](https://github.com/weavatar/initials/actions)
7+
[![Report Card](https://goreportcard.com/badge/github.com/weavatar/initials)](https://goreportcard.com/report/github.com/weavatar/initials)
98

10-
Letter avatar generation for Go.
9+
Initials avatar generation for Go.
1110

1211
## Usage
1312

14-
Generate a 100x100px 'A'-letter avatar:
13+
Generate a 100x100px 'A'-initial avatar:
1514

1615
```go
17-
img, err := letteravatar.Draw(100, 'A', nil)
16+
img, err := initials.Draw(100, 'A', nil)
1817
```
1918

2019
The third parameter `options *Options` can be used for customization:
@@ -32,7 +31,7 @@ type Options struct {
3231
Using a custom palette:
3332

3433
```go
35-
img, err := letteravatar.Draw(100, []rune{'A'}, &letteravatar.Options{
34+
img, err := initials.Draw(100, []rune{'A'}, &initials.Options{
3635
Palette: []color.Color{
3736
color.RGBA{255, 0, 0, 255},
3837
color.RGBA{0, 255, 0, 255},
@@ -43,7 +42,7 @@ img, err := letteravatar.Draw(100, []rune{'A'}, &letteravatar.Options{
4342

4443
## Documentation
4544

46-
[https://godoc.org/github.com/tnb-labs/letteravatar/v2](https://godoc.org/github.com/tnb-labs/letteravatar/v2)
45+
[https://godoc.org/github.com/weavatar/initials](https://godoc.org/github.com/weavatar/initials)
4746

4847
## Examples
4948

@@ -68,7 +67,7 @@ import (
6867
"os"
6968
"unicode/utf8"
7069

71-
"github.com/tnb-labs/letteravatar/v2"
70+
"github.com/weavatar/initials"
7271
)
7372

7473
var names = []string{
@@ -90,7 +89,7 @@ func main() {
9089
for _, name := range names {
9190
firstLetter, _ := utf8.DecodeRuneInString(name)
9291

93-
img, err := letteravatar.Draw(75, []rune{firstLetter}, nil)
92+
img, err := initials.Draw(75, []rune{firstLetter}, nil)
9493
if err != nil {
9594
log.Fatal(err)
9695
}
@@ -111,7 +110,7 @@ func main() {
111110

112111
## License
113112

114-
The package "letteravatar" is distributed under the terms of the MIT license.
113+
The package "initials" is distributed under the terms of the MIT license.
115114

116115
The Roboto-Medium font is distributed under the terms of the Apache License v2.0.
117116

draw.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// Package letteravatar generates letter-avatars.
2-
package letteravatar
1+
// Package initials generates initials-avatars.
2+
package initials
33

44
import (
55
"fmt"

draw_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package letteravatar
1+
package initials
22

33
import (
44
"image"

example/example.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"os"
77
"unicode/utf8"
88

9-
"github.com/tnb-labs/letteravatar/v2"
9+
"github.com/weavatar/initials"
1010
)
1111

1212
var names = []string{
@@ -28,7 +28,7 @@ func main() {
2828
for _, name := range names {
2929
firstLetter, _ := utf8.DecodeRuneInString(name)
3030

31-
img, err := letteravatar.Draw(75, []rune{firstLetter}, nil)
31+
img, err := initials.Draw(75, []rune{firstLetter}, nil)
3232
if err != nil {
3333
log.Fatal(err)
3434
}

font.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
207207
*/
208208

209-
package letteravatar
209+
package initials
210210

211211
import (
212212
"bytes"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/tnb-labs/letteravatar/v2
1+
module github.com/weavatar/initials
22

33
go 1.23.0
44

palette.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package letteravatar
1+
package initials
22

33
import (
44
"image/color"

0 commit comments

Comments
 (0)