-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cmd): add --exclude-dirs option (#101)
- Loading branch information
Showing
5 changed files
with
163 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<!-- Code generated by gomarkdoc. DO NOT EDIT --> | ||
|
||
# logger | ||
|
||
```go | ||
import "github.com/princjef/gomarkdoc/logger" | ||
``` | ||
|
||
Package logger provides a simple console logger for reporting information about execution to stderr. | ||
|
||
## Index | ||
|
||
- [type Level](<#Level>) | ||
- [type Logger](<#Logger>) | ||
- [func New\(level Level, opts ...Option\) Logger](<#New>) | ||
- [type Option](<#Option>) | ||
- [func WithField\(key string, value interface\{\}\) Option](<#WithField>) | ||
|
||
|
||
<a name="Level"></a> | ||
## type [Level](<https://github.com/princjef/gomarkdoc/blob/master/logger/logger.go#L24>) | ||
|
||
Level defines valid logging levels for a Logger. | ||
|
||
```go | ||
type Level int | ||
``` | ||
|
||
<a name="DebugLevel"></a>Valid logging levels | ||
|
||
```go | ||
const ( | ||
DebugLevel Level = iota + 1 | ||
InfoLevel | ||
WarnLevel | ||
ErrorLevel | ||
) | ||
``` | ||
|
||
<a name="Logger"></a> | ||
## type [Logger](<https://github.com/princjef/gomarkdoc/blob/master/logger/logger.go#L12-L21>) | ||
|
||
Logger provides basic logging capabilities at different logging levels. | ||
|
||
```go | ||
type Logger interface { | ||
Debug(a ...interface{}) | ||
Debugf(format string, a ...interface{}) | ||
Info(a ...interface{}) | ||
Infof(format string, a ...interface{}) | ||
Warn(a ...interface{}) | ||
Warnf(format string, a ...interface{}) | ||
Error(a ...interface{}) | ||
Errorf(format string, a ...interface{}) | ||
} | ||
``` | ||
|
||
<a name="New"></a> | ||
### func [New](<https://github.com/princjef/gomarkdoc/blob/master/logger/logger.go#L44>) | ||
|
||
```go | ||
func New(level Level, opts ...Option) Logger | ||
``` | ||
|
||
New initializes a new Logger. | ||
|
||
<a name="Option"></a> | ||
## type [Option](<https://github.com/princjef/gomarkdoc/blob/master/logger/logger.go#L27>) | ||
|
||
Option defines an option for configuring the logger. | ||
|
||
```go | ||
type Option func(opts *options) | ||
``` | ||
|
||
<a name="WithField"></a> | ||
### func [WithField](<https://github.com/princjef/gomarkdoc/blob/master/logger/logger.go#L83>) | ||
|
||
```go | ||
func WithField(key string, value interface{}) Option | ||
``` | ||
|
||
WithField sets the provided key/value pair for use on all logs. | ||
|
||
Generated by [gomarkdoc](<https://github.com/princjef/gomarkdoc>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters