Skip to content

Commit

Permalink
Admin API enable does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
little-cui committed Sep 12, 2018
1 parent 0ef4583 commit 76ed873
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ vendor

_build
coverage.txt
go.sum
go.sum

mesher.tar.gz
/release/
2 changes: 1 addition & 1 deletion adminapi/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
func Init() (err error) {
isAdminEnable := config.GetConfig().Admin.Enable

if isAdminEnable != nil && *isAdminEnable == false {
if !isAdminEnable {
lager.Logger.Infof("admin api are not enable")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion config/struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type Plugin struct {

//Admin has attributes for enabling, serverURI and metrics for admin data
type Admin struct {
Enable *bool `yaml:"enable"`
Enable bool `yaml:"enable"`
ServerURI string `yaml:"serverUri"`
GoRuntimeMetrics bool `yaml:"goRuntimeMetrics"`
}

0 comments on commit 76ed873

Please sign in to comment.