Skip to content

Commit 534bec8

Browse files
committed
docs(readme): readme style fixes
1 parent 6f6be42 commit 534bec8

1 file changed

Lines changed: 17 additions & 8 deletions

File tree

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
66
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge)](LICENSE)
77
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge)](http://commitizen.github.io/cz-cli/)
8-
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release?style=for-the-badge)
9-
[![Actions Status](https://github.com/brpaz/echo-zap/workflows/CI/badge.svg?style=for-the-badge)](https://github.com/brpaz/echozap/actions)
8+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge)](https://github.com/semantic-release/semantic-release?style=for-the-badge)
9+
[![Actions Status](https://github.com/brpaz/echozap/workflows/CI/badge.svg?style=for-the-badge)](https://github.com/brpaz/echozap/actions)
1010

1111
## Pre-requisites
1212

@@ -17,19 +17,28 @@
1717
## Usage
1818

1919
```go
20+
package main
21+
2022
import (
21-
"github.com/labstack/echo/v4"
23+
"net/http"
24+
25+
"github.com/brpaz/echozap"
26+
"github.com/labstack/echo"
2227
"go.uber.org/zap"
23-
"github.com/brpaz/echozap"
2428
)
2529

2630
func main() {
27-
e := echo.New()
28-
zapLogger, _ = zap.NewProduction()
31+
e := echo.New()
2932

30-
e.Use(echozap.ZapLogger(zapLogger))
31-
}
33+
zapLogger, _ := zap.NewProduction()
3234

35+
e.Use(echozap.ZapLogger(zapLogger))
36+
37+
e.GET("/", func(c echo.Context) error {
38+
return c.String(http.StatusOK, "Hello, World!")
39+
})
40+
e.Logger.Fatal(e.Start(":1323"))
41+
}
3342
```
3443

3544
## Logged details

0 commit comments

Comments
 (0)