add debug vars
This commit is contained in:
		
							parent
							
								
									d1179084fd
								
							
						
					
					
						commit
						32d4eff973
					
				|  | @ -1 +0,0 @@ | ||||||
| /go.sum |  | ||||||
|  | @ -3,7 +3,7 @@ go: | ||||||
| - 1.16.x | - 1.16.x | ||||||
| before_install: | before_install: | ||||||
|   # download super-linter: golangci-lint |   # download super-linter: golangci-lint | ||||||
| - curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin latest | - curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.38.0 | ||||||
| script: | script: | ||||||
| - go test ./... | - go test ./... | ||||||
| - golangci-lint run --enable-all -D exhaustivestruct,nlreturn | - golangci-lint run --enable-all -D exhaustivestruct,nlreturn,interfacer,maligned | ||||||
|  |  | ||||||
|  | @ -3,14 +3,14 @@ module github.com/unifi-poller/webserver | ||||||
| go 1.16 | go 1.16 | ||||||
| 
 | 
 | ||||||
| require ( | require ( | ||||||
| 	github.com/golang/protobuf v1.5.1 // indirect | 	github.com/golang/protobuf v1.5.2 // indirect | ||||||
| 	github.com/gorilla/mux v1.8.0 | 	github.com/gorilla/mux v1.8.0 | ||||||
| 	github.com/prometheus/client_golang v1.10.0 // indirect | 	github.com/prometheus/client_golang v1.10.0 // indirect | ||||||
| 	github.com/prometheus/common v0.20.0 // indirect | 	github.com/prometheus/common v0.20.0 // indirect | ||||||
| 	github.com/unifi-poller/poller v0.0.0-20210315011940-c43dc3c221b4 | 	github.com/unifi-poller/poller v0.0.0-20210315011940-c43dc3c221b4 | ||||||
| 	golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 | 	golang.org/x/crypto v0.0.0-20210415154028-4f45737414dc | ||||||
| 	golang.org/x/sys v0.0.0-20210324051608-47abb6519492 // indirect | 	golang.org/x/sys v0.0.0-20210415045647-66c3f260301c // indirect | ||||||
| 	golang.org/x/term v0.0.0-20210317153231-de623e64d2a6 // indirect | 	golang.org/x/term v0.0.0-20210406210042-72f3dc4e9b72 // indirect | ||||||
| 	golift.io/cnfg v0.0.7 // indirect | 	golift.io/cnfg v0.0.7 // indirect | ||||||
| 	gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect | 	gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect | ||||||
| ) | ) | ||||||
|  |  | ||||||
|  | @ -108,7 +108,7 @@ func (s *Server) Start() (err error) { | ||||||
| func (s *Server) newRouter() *mux.Router { | func (s *Server) newRouter() *mux.Router { | ||||||
| 	router := mux.NewRouter() | 	router := mux.NewRouter() | ||||||
| 	// special routes
 | 	// special routes
 | ||||||
| 	// router.Handle("/debug/vars", http.DefaultServeMux).Methods("GET")      // unauthenticated expvar
 | 	router.Handle("/debug/vars", http.DefaultServeMux).Methods("GET")        // unauthenticated expvar
 | ||||||
| 	router.HandleFunc("/health", s.handleLog(s.handleHealth)).Methods("GET") // unauthenticated health
 | 	router.HandleFunc("/health", s.handleLog(s.handleHealth)).Methods("GET") // unauthenticated health
 | ||||||
| 	// main web app/files/js/css
 | 	// main web app/files/js/css
 | ||||||
| 	router.HandleFunc("/", s.basicAuth(s.handleIndex)).Methods("GET", "POST") | 	router.HandleFunc("/", s.basicAuth(s.handleIndex)).Methods("GET", "POST") | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue