Fix linting problems

This commit is contained in:
Jamie Curnow
2021-06-30 11:20:34 +10:00
parent 80a31b3041
commit 86a35beb3a
26 changed files with 53 additions and 51 deletions

View File

@@ -10,7 +10,7 @@ import (
"npm/internal/logger"
)
// SetAuth ...
// SetAuth sets a auth method
// Route: POST /users/:userID/auth
func SetAuth() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {

View File

@@ -72,7 +72,7 @@ func CreateCertificateAuthority() func(http.ResponseWriter, *http.Request) {
}
}
// UpdateCertificateAuthority ...
// UpdateCertificateAuthority updates a ca
// Route: PUT /certificate-authorities/{caID}
func UpdateCertificateAuthority() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
@@ -105,7 +105,7 @@ func UpdateCertificateAuthority() func(http.ResponseWriter, *http.Request) {
}
}
// DeleteCertificateAuthority ...
// DeleteCertificateAuthority deletes a ca
// Route: DELETE /certificate-authorities/{caID}
func DeleteCertificateAuthority() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {

View File

@@ -77,7 +77,7 @@ func CreateCertificate() func(http.ResponseWriter, *http.Request) {
}
}
// UpdateCertificate ...
// UpdateCertificate updates a cert
// Route: PUT /certificates/{certificateID}
func UpdateCertificate() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
@@ -124,7 +124,7 @@ func UpdateCertificate() func(http.ResponseWriter, *http.Request) {
}
}
// DeleteCertificate ...
// DeleteCertificate deletes a cert
// Route: DELETE /certificates/{certificateID}
func DeleteCertificate() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {

View File

@@ -76,7 +76,7 @@ func CreateDNSProvider() func(http.ResponseWriter, *http.Request) {
}
}
// UpdateDNSProvider ...
// UpdateDNSProvider updates a provider
// Route: PUT /dns-providers/{providerID}
func UpdateDNSProvider() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
@@ -108,7 +108,7 @@ func UpdateDNSProvider() func(http.ResponseWriter, *http.Request) {
}
}
// DeleteDNSProvider ...
// DeleteDNSProvider removes a provider
// Route: DELETE /dns-providers/{providerID}
func DeleteDNSProvider() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {

View File

@@ -82,7 +82,7 @@ func CreateHost() func(http.ResponseWriter, *http.Request) {
}
}
// UpdateHost ...
// UpdateHost updates a host
// Route: PUT /hosts/{hostID}
func UpdateHost() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
@@ -114,7 +114,7 @@ func UpdateHost() func(http.ResponseWriter, *http.Request) {
}
}
// DeleteHost ...
// DeleteHost removes a host
// Route: DELETE /hosts/{hostID}
func DeleteHost() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {

View File

@@ -69,7 +69,7 @@ func CreateSetting() func(http.ResponseWriter, *http.Request) {
}
}
// UpdateSetting ...
// UpdateSetting updates a setting
// Route: PUT /settings/{name}
func UpdateSetting() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {

View File

@@ -76,7 +76,7 @@ func CreateStream() func(http.ResponseWriter, *http.Request) {
}
}
// UpdateStream ...
// UpdateStream updates a stream
// Route: PUT /hosts/streams/{hostID}
func UpdateStream() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
@@ -108,7 +108,7 @@ func UpdateStream() func(http.ResponseWriter, *http.Request) {
}
}
// DeleteStream ...
// DeleteStream removes a stream
// Route: DELETE /hosts/streams/{hostID}
func DeleteStream() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {

View File

@@ -16,7 +16,7 @@ import (
"github.com/go-chi/chi"
)
// GetUsers ...
// GetUsers returns all users
// Route: GET /users
func GetUsers() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
@@ -35,7 +35,7 @@ func GetUsers() func(http.ResponseWriter, *http.Request) {
}
}
// GetUser ...
// GetUser returns a specific user
// Route: GET /users/{userID}
func GetUser() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
@@ -55,7 +55,7 @@ func GetUser() func(http.ResponseWriter, *http.Request) {
}
}
// UpdateUser ...
// UpdateUser updates a user
// Route: PUT /users/{userID}
func UpdateUser() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
@@ -96,7 +96,7 @@ func UpdateUser() func(http.ResponseWriter, *http.Request) {
}
}
// DeleteUser ...
// DeleteUser removes a user
// Route: DELETE /users/{userID}
func DeleteUser() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
@@ -122,7 +122,7 @@ func DeleteUser() func(http.ResponseWriter, *http.Request) {
}
}
// CreateUser ...
// CreateUser creates a user
// Route: POST /users
func CreateUser() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {