Update linter
This commit is contained in:
parent
f12c27aa7c
commit
328611c619
157 changed files with 489 additions and 508 deletions
|
@ -10,10 +10,10 @@ import (
|
|||
"github.com/opentracing/opentracing-go"
|
||||
)
|
||||
|
||||
// Name sets the name of this tracer
|
||||
// Name sets the name of this tracer.
|
||||
const Name = "haystack"
|
||||
|
||||
// Config provides configuration settings for a haystack tracer
|
||||
// Config provides configuration settings for a haystack tracer.
|
||||
type Config struct {
|
||||
LocalAgentHost string `description:"Set haystack-agent's host that the reporter will used." json:"localAgentHost,omitempty" toml:"localAgentHost,omitempty" yaml:"localAgentHost,omitempty"`
|
||||
LocalAgentPort int `description:"Set haystack-agent's port that the reporter will used." json:"localAgentPort,omitempty" toml:"localAgentPort,omitempty" yaml:"localAgentPort,omitempty"`
|
||||
|
@ -30,7 +30,7 @@ func (c *Config) SetDefaults() {
|
|||
c.LocalAgentPort = 35000
|
||||
}
|
||||
|
||||
// Setup sets up the tracer
|
||||
// Setup sets up the tracer.
|
||||
func (c *Config) Setup(serviceName string) (opentracing.Tracer, io.Closer, error) {
|
||||
tag := strings.SplitN(c.GlobalTag, ":", 2)
|
||||
|
||||
|
|
|
@ -4,22 +4,21 @@ import (
|
|||
"github.com/containous/traefik/v2/pkg/log"
|
||||
)
|
||||
|
||||
/*NullLogger does nothing*/
|
||||
type haystackLogger struct {
|
||||
logger log.Logger
|
||||
}
|
||||
|
||||
/*Error prints the error message*/
|
||||
// Error prints the error message.
|
||||
func (l haystackLogger) Error(format string, v ...interface{}) {
|
||||
l.logger.Errorf(format, v)
|
||||
}
|
||||
|
||||
/*Info prints the info message*/
|
||||
// Info prints the info message.
|
||||
func (l haystackLogger) Info(format string, v ...interface{}) {
|
||||
l.logger.Infof(format, v)
|
||||
}
|
||||
|
||||
/*Debug prints the info message*/
|
||||
// Debug prints the info message.
|
||||
func (l haystackLogger) Debug(format string, v ...interface{}) {
|
||||
l.logger.Debug(format, v)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue