mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-13 11:57:33 -04:00
use golangci-lint
This commit is contained in:
@@ -62,10 +62,10 @@ def testing(ctx):
|
||||
},
|
||||
{
|
||||
'name': 'staticcheck',
|
||||
'image': 'webhippie/golang:1.13',
|
||||
'image': 'golangci/golangci-lint:latest',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'make staticcheck',
|
||||
'golangci-lint run',
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
|
||||
4
Makefile
4
Makefile
@@ -74,10 +74,6 @@ fmt:
|
||||
vet:
|
||||
go vet $(PACKAGES)
|
||||
|
||||
.PHONY: staticcheck
|
||||
staticcheck:
|
||||
go run honnef.co/go/tools/cmd/staticcheck -tags '$(TAGS)' $(PACKAGES)
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
for PKG in $(PACKAGES); do go run golang.org/x/lint/golint -set_exit_status $$PKG || exit 1; done;
|
||||
|
||||
@@ -33,9 +33,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
|
||||
runtime := runtime.New()
|
||||
runtime.Start()
|
||||
|
||||
return nil
|
||||
return runtime.Start()
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,9 +12,7 @@ func Command(app *cli.App) *cli.Command {
|
||||
Category: "Micro",
|
||||
Action: func(c *cli.Context) error {
|
||||
runtime := New()
|
||||
runtime.Start()
|
||||
|
||||
return nil
|
||||
return runtime.Start()
|
||||
},
|
||||
}
|
||||
return &command
|
||||
|
||||
@@ -15,17 +15,6 @@ type Options struct {
|
||||
// Option undocummented
|
||||
type Option func(o *Options)
|
||||
|
||||
// newOptions initializes the available default options.
|
||||
func newOptions(opts ...Option) Options {
|
||||
opt := Options{}
|
||||
|
||||
for _, o := range opts {
|
||||
o(&opt)
|
||||
}
|
||||
|
||||
return opt
|
||||
}
|
||||
|
||||
// Services option
|
||||
func Services(s []string) Option {
|
||||
return func(o *Options) {
|
||||
|
||||
Reference in New Issue
Block a user