Skip to content

Commit e70e6b4

Browse files
authored
choro: Rename package and imports from colorlog to gocolorlog
* fix: Update release-please action and simplify config * choro: Rename package and imports from colorlog to gocolorlog
1 parent cc8a8ec commit e70e6b4

File tree

5 files changed

+12
-26
lines changed

5 files changed

+12
-26
lines changed

README.md

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ It maps HTTP status codes to colored log levels, making your terminal output cle
1616
## Installation
1717

1818
```sh
19-
go get github.com/ayberkgezer/colorlog
19+
go get github.com/ayberkgezer/gocolorlog
2020
```
2121

2222
## Usage
@@ -28,11 +28,11 @@ import (
2828
"fmt"
2929
"time"
3030

31-
"github.com/ayberkgezer/colorlog"
31+
"github.com/ayberkgezer/gocolorlog"
3232
)
3333

3434
func main() {
35-
log := colorlog.NewLogger()
35+
log := gocolorlog.NewLogger()
3636
log.Log(200, "GET", "/api/test", 120*time.Millisecond, nil)
3737
log.Log(404, "POST", "/api/notfound", 80*time.Millisecond, nil)
3838
log.Log(500, "DELETE", "/api/error", 200*time.Millisecond,
@@ -68,25 +68,11 @@ type Logger interface {
6868
### Creating a Logger
6969

7070
```go
71-
log := colorlog.NewLogger()
71+
log := gocolorlog.NewLogger()
7272
```
7373

7474
You can also customize the output destination (see below).
7575

76-
## Customization
77-
78-
You can provide a custom writer (for example, to log to a file):
79-
80-
```go
81-
import (
82-
"os"
83-
"github.com/ayberkgezer/colorlog/internal/options"
84-
)
85-
86-
file, _ := os.Create("mylog.txt")
87-
log := colorlog.NewLogger(options.WithWriter(file))
88-
```
89-
9076
## License
9177

9278
This project is licensed under the [GNU General Public License v3.0](LICENSE).

colorlog.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Package colorlog provides a simple, colored and status-based logging interface for Go.
22
// HTTP status koduna göre renkli ve seviyeli loglama arayüzü sunar.
3-
package colorlog
3+
package gocolorlog
44

55
import (
66
"time"
77

8-
"github.com/ayberkgezer/colorlog/internal/logger"
8+
"github.com/ayberkgezer/gocolorlog/internal/logger"
99
)
1010

1111
// Logger is the common interface for any structure that can log with color and status.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module github.com/ayberkgezer/colorlog
1+
module github.com/ayberkgezer/gocolorlog
22

33
go 1.24.2

internal/logger/logger.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"log"
77
"time"
88

9-
"github.com/ayberkgezer/colorlog/internal/color"
10-
"github.com/ayberkgezer/colorlog/internal/level"
11-
"github.com/ayberkgezer/colorlog/internal/options"
9+
"github.com/ayberkgezer/gocolorlog/internal/color"
10+
"github.com/ayberkgezer/gocolorlog/internal/level"
11+
"github.com/ayberkgezer/gocolorlog/internal/options"
1212
)
1313

1414
// Logger is the default logger type for colored output.

main/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import (
44
"fmt"
55
"time"
66

7-
"github.com/ayberkgezer/colorlog"
7+
"github.com/ayberkgezer/gocolorlog"
88
)
99

1010
func main() {
11-
log := colorlog.NewLogger()
11+
log := gocolorlog.NewLogger()
1212
log.Log(200, "GET", "/api/test", 120*time.Millisecond, nil)
1313
log.Log(404, "POST", "/api/notfound", 80*time.Millisecond, nil)
1414
log.Log(500, "DELETE", "/api/error", 200*time.Millisecond,

0 commit comments

Comments
 (0)