Skip to content

Commit

Permalink
statticcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkasun committed Sep 20, 2023
1 parent fcb520d commit 1e26a96
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
19 changes: 7 additions & 12 deletions controllers/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,11 @@ type networkBodyParam struct {
Network models.Network `json:"network"`
}

// swagger:parameters updateNetwork updateNetwork updateNetworkNodeLimit deleteNetwork keyUpdate createAccessKey getAccessKeys updateNetworkACL getNetworkACL
// swagger:parameters updateNetwork updateNetwork updateNetworkNodeLimit keyUpdate createAccessKey getAccessKeys
type networkPathParam struct {
// Network
// in: path
network string
Network string `json:"network"`
}

// swagger:response networkBodyResponse
Expand Down Expand Up @@ -339,7 +339,7 @@ type HostID struct {
}

// swagger:parameters addHostToNetwork deleteHostFromNetwork
type hostFromNetworkParams struct {
type HostFromNetworkParams struct {
// hostid to add or delete from network
// in: path
HostID string `json:"hostid"`
Expand All @@ -349,20 +349,13 @@ type hostFromNetworkParams struct {
}

// swagger:parameters deleteEnrollmentKey
type deleteEnrollmentKeyParam struct {
type DeleteEnrollmentKeyParam struct {
// in: path
KeyID string `json:"keyid"`
}

// swagger:parameters getEnrollmentKey createEnrollmentKey
type token struct {
// token
// in: path
token string
}

// swagger:parameters handleHostRegister
type registerParams struct {
type RegisterParams struct {
// in: path
Token string `json:"token"`
// in: body
Expand Down Expand Up @@ -448,5 +441,7 @@ func useUnused() bool {
_ = hostPull{}
_ = okRespone{}
_ = signal{}
_ = filenameToGet{}
_ = dnsNetworkPathParam{}
return false
}
2 changes: 1 addition & 1 deletion controllers/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func networkHandlers(r *mux.Router) {
r.HandleFunc("/api/networks/{networkname}/acls", logic.SecurityCheck(true, http.HandlerFunc(getNetworkACL))).Methods(http.MethodGet)
}

// swagger:route GET /api/networks networks getNetworks
// swagger:route GET /api/networks networks getAllNetworks
//
// Lists all networks.
//
Expand Down
8 changes: 4 additions & 4 deletions swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,7 @@ paths:
- hosts
/api/networks:
get:
operationId: getNetworks
operationId: getAllNetworks
responses:
"200":
$ref: '#/responses/getNetworksSliceResponse'
Expand Down Expand Up @@ -1664,10 +1664,10 @@ paths:
operationId: updateNetwork
parameters:
- description: Network
in: body
in: path
name: network
schema:
$ref: '#/definitions/Network'
required: true
type: string
x-go-name: Network
responses:
"200":
Expand Down

0 comments on commit 1e26a96

Please sign in to comment.