Updated dependencies

This commit is contained in:
Quentin McGaw
2020-04-19 18:13:48 +00:00
parent cbd11bfdf2
commit e805d42197
21 changed files with 140 additions and 108 deletions

7
internal/env/env.go vendored
View File

@@ -1,6 +1,7 @@
package env
import (
"context"
"os"
"github.com/qdm12/golibs/logging"
@@ -8,7 +9,7 @@ import (
type Env interface {
FatalOnError(err error)
PrintVersion(program string, commandFn func() (string, error))
PrintVersion(ctx context.Context, program string, commandFn func(ctx context.Context) (string, error))
}
type env struct {
@@ -30,8 +31,8 @@ func (e *env) FatalOnError(err error) {
}
}
func (e *env) PrintVersion(program string, commandFn func() (string, error)) {
version, err := commandFn()
func (e *env) PrintVersion(ctx context.Context, program string, commandFn func(ctx context.Context) (string, error)) {
version, err := commandFn(ctx)
if err != nil {
e.logger.Error(err)
} else {