handlers/user/user.go
Function Create
has 6 return statements (exceeds 4 allowed). Open
Open
func Create(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
parent := opentracing.GlobalTracer().StartSpan("POST /users")
defer parent.Finish()
Function Update
has 5 return statements (exceeds 4 allowed). Open
Open
func Update(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
parent := opentracing.GlobalTracer().StartSpan("PUT /users")
defer parent.Finish()
exported function Create should have comment or be unexported Open
Open
func Create(w http.ResponseWriter, r *http.Request) {
- Exclude checks
var userId should be userID Open
Open
var userId = chi.URLParam(r, "userId")
- Exclude checks
exported function Update should have comment or be unexported Open
Open
func Update(w http.ResponseWriter, r *http.Request) {
- Exclude checks
exported function List should have comment or be unexported Open
Open
func List(w http.ResponseWriter, r *http.Request) {
- Exclude checks
don't use underscores in Go names; var is_err should be isErr Open
Open
is_err := CheckUniqueUser(w, user)
- Exclude checks
exported function Delete should have comment or be unexported Open
Open
func Delete(w http.ResponseWriter, r *http.Request) {
- Exclude checks
var userId should be userID Open
Open
var userId = chi.URLParam(r, "userId")
- Exclude checks