mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-02-02 16:28:39 +08:00
fix golint issues in core/prometheus (#506)
This commit is contained in:
parent
b4bb5c0323
commit
6e4c98e52d
@ -12,6 +12,7 @@ import (
|
|||||||
|
|
||||||
var once sync.Once
|
var once sync.Once
|
||||||
|
|
||||||
|
// StartAgent starts a prometheus agent.
|
||||||
func StartAgent(c Config) {
|
func StartAgent(c Config) {
|
||||||
once.Do(func() {
|
once.Do(func() {
|
||||||
if len(c.Host) == 0 {
|
if len(c.Host) == 0 {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package prometheus
|
package prometheus
|
||||||
|
|
||||||
|
// A Config is a prometheus config.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Host string `json:",optional"`
|
Host string `json:",optional"`
|
||||||
Port int `json:",default=9101"`
|
Port int `json:",default=9101"`
|
||||||
|
Loading…
Reference in New Issue
Block a user