errcodegen

command module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

README

errcodegen

A error code generator.

License Build Status

Install

Install binary and put it under your PATH.

$ go install github.com/RivenZoo/errcodegen

Usage

Usage:
  errcodegen [flags]

Flags:
      --appcode string        App error code, three digits (default "100")      # set code for your app
      --config string         config file (default is $HOME/.errcodegen.yaml)   # config file path
      --err_def string        Error code definiton file                         # definition file path
      --err_func string       New error function name (default "New")           # function to new error variable
      --err_func_pkg string   New error function package import path (default "errors") # package that err_func belongs to
      --pkg string            Generated module package name (default "errorcodes")  # generated code package name

Example

See example

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
This file is used to trigger go generate.
This file is used to trigger go generate.
pkg
errcode_def
errcode_def contain self defined error code definition format.
errcode_def contain self defined error code definition format.
gen
log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL