Skip to content
Permalink
Browse files

internal/code: replace unreachable case with a panic

It can never be reached because we already parse the request type
via parseModuleProxyRequest, which makes sure that it's one of the
supported ones ("list", "info", "mod", or "zip").
  • Loading branch information...
dmitshur committed May 6, 2019
1 parent dd5eb37 commit 1ff7a4b4062bedceac950f02b150609a33afd6f7
Showing with 1 addition and 1 deletion.
  1. +1 −1 internal/code/module.go
@@ -186,7 +186,7 @@ func (h ModuleHandler) ServeModuleMaybe(w http.ResponseWriter, req *http.Request
err = z.Close()
return err
default:
return os.ErrNotExist
panic("unreachable")
}
}

0 comments on commit 1ff7a4b

Please sign in to comment.
You can’t perform that action at this time.