README
¶
ZapLogger Plugin
The ZapLogger
plugin is a Goa v3 plugin
that adapt the basic logger to use the zap library.
Enabling the Plugin
To enable the plugin import it in your design.go file using the blank identifier _
as follows:
package design
import . "goa.design/goa/v3/http/design"
import . "goa.design/goa/v3/http/dsl"
import _ "goa.design/plugins/v3/zaplogger" // Enables the plugin
var _ = API("...
and generate as usual:
goa gen PACKAGE
goa example PACKAGE
where PACKAGE
is the Go import path of the design package.
Documentation
¶
Index ¶
- func Generate(genpkg string, roots []eval.Root, files []*codegen.File) ([]*codegen.File, error)
- func GenerateFiles(genpkg string, root *expr.RootExpr) []*codegen.File
- func GenerateLoggerFile(genpkg string) *codegen.File
- func UpdateExample(genpkg string, roots []eval.Root, files []*codegen.File) ([]*codegen.File, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateFiles ¶
GenerateFiles create log specific files
func GenerateLoggerFile ¶
GenerateLoggerFile returns the generated zap logger file.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.