forked from TrueCloudLab/frostfs-http-gw
*: fix all comment-related golint warnings
Some of this code is going to be moved to SDK library, so it's important. Signed-off-by: Roman Khimov <roman@nspcc.ru>
This commit is contained in:
parent
3173c70eb6
commit
df3c87af79
14 changed files with 88 additions and 4 deletions
4
app.go
4
app.go
|
@ -27,14 +27,17 @@ type (
|
|||
webDone chan struct{}
|
||||
}
|
||||
|
||||
// App is an interface for the main gateway function.
|
||||
App interface {
|
||||
Wait()
|
||||
Serve(context.Context)
|
||||
}
|
||||
|
||||
// Option is an application option.
|
||||
Option func(a *app)
|
||||
)
|
||||
|
||||
// WithLogger returns Option to set a specific logger.
|
||||
func WithLogger(l *zap.Logger) Option {
|
||||
return func(a *app) {
|
||||
if l == nil {
|
||||
|
@ -44,6 +47,7 @@ func WithLogger(l *zap.Logger) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// WithConfig returns Option to use specific Viper configuration.
|
||||
func WithConfig(c *viper.Viper) Option {
|
||||
return func(a *app) {
|
||||
if c == nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue