Skip to content

Commit 7c7fcba

Browse files
committed
docs: Update README with additional badges and fix formatting in usage examples
1 parent 31fe28d commit 7c7fcba

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# gocolorlog
22

3+
![GitHub Tag](https://img.shields.io/github/v/tag/ayberkgezer/gocolorlog)
4+
![GitHub License](https://img.shields.io/github/license/ayberkgezer/gocolorlog)
5+
![GitHub Go Modules](https://img.shields.io/github/go-mod/go-version/ayberkgezer/gocolorlog)
6+
![GitHub Issues](https://img.shields.io/github/issues/ayberkgezer/gocolorlog)
7+
38
**gocolorlog** is a simple, extensible, and colored logging package for Go.
49
It maps HTTP status codes to colored log levels, making your terminal output clear and easy to read.
510

@@ -50,9 +55,9 @@ func main() {
5055
gocolorlog.Error("Failed to connect to DB")
5156
gocolorlog.Errorf("Failed to open file: %s", "config.yaml")
5257

53-
gocolorlog.HTTP(200, "GET", "/api/test", 120*time.Millisecond,"ip-adress", "",nil)
54-
gocolorlog.HTTP(404, "POST", "/api/notfound", 80*time.Millisecond,"ip-adress","Requsetid", nil)
55-
gocolorlog.HTTP(500, "DELETE", "/api/error", 200*time.Millisecond,"ip-adress", "Requsetid",fmt.Errorf("internal server error"))
58+
gocolorlog.HTTP(200, "GET", "/api/test", 120*time.Millisecond, "ip-adress", "", nil)
59+
gocolorlog.HTTP(404, "POST", "/api/notfound", 80*time.Millisecond, "ip-adress", "Requsetid", nil)
60+
gocolorlog.HTTP(500, "DELETE", "/api/error", 200*time.Millisecond, "ip-adress", "Requsetid", fmt.Errorf("internal server error"))
5661

5762
gocolorlog.ContextLevel("INFO", "Bootstrap", "Application is running on: %s", "http://localhost:3000")
5863

0 commit comments

Comments
 (0)