open-nomad/command/agent/operator_endpoint_oss.go
Mahmood Ali 4d90afb425 gofmt all the files
mostly to handle build directives in 1.17.
2021-10-01 10:14:28 -04:00

22 lines
387 B
Go

//go:build !ent
// +build !ent
package agent
import (
"net/http"
)
func (s *HTTPServer) LicenseRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) {
switch req.Method {
case "GET":
resp.WriteHeader(http.StatusNoContent)
return nil, nil
case "PUT":
return nil, CodedError(501, ErrEntOnly)
default:
return nil, CodedError(405, ErrInvalidMethod)
}
}