more golint cleanup

This commit is contained in:
Roland Osborne 2022-07-25 11:44:33 -07:00
parent 18616539d3
commit 118404c77f
10 changed files with 12 additions and 3 deletions

View File

@ -16,7 +16,7 @@ func GetAccountAsset(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
}
//RemoveAccount TODO remove app attached to account
//RemoveAccountApp TODO remove app attached to account
func RemoveAccountApp(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
w.WriteHeader(http.StatusOK)

View File

@ -7,6 +7,7 @@ import (
"net/http"
)
//AddArticle add a new article for account specified by agent query param
func AddArticle(w http.ResponseWriter, r *http.Request) {
account, code, err := ParamAgentToken(r, false)

View File

@ -10,6 +10,7 @@ import (
"net/http"
)
//AddCard adds contact to account specified by agent query param
func AddCard(w http.ResponseWriter, r *http.Request) {
account, code, err := ParamAgentToken(r, false)

View File

@ -7,6 +7,7 @@ import (
"net/http"
)
//AddChannel adds a channel to account specified by qgent query param
func AddChannel(w http.ResponseWriter, r *http.Request) {
account, code, err := ParamAgentToken(r, false)

View File

@ -7,6 +7,7 @@ import (
"net/http"
)
//AddChannelTopic adds a topic to a channel through either contact or agent query param
func AddChannelTopic(w http.ResponseWriter, r *http.Request) {
confirm := r.FormValue("confirm")

View File

@ -14,6 +14,7 @@ import (
"strings"
)
//AddChannelTopicAsset adds an asset to a topic and queues it for appropriate transform
func AddChannelTopicAsset(w http.ResponseWriter, r *http.Request) {
// scan parameters
@ -82,7 +83,7 @@ func AddChannelTopicAsset(w http.ResponseWriter, r *http.Request) {
return
}
defer file.Close()
crc, size, err := SaveAsset(file, path)
crc, size, err := saveAsset(file, path)
if err != nil {
ErrResponse(w, http.StatusInternalServerError, err)
return
@ -193,7 +194,7 @@ func isStorageFull(act *store.Account) (full bool, err error) {
return
}
func SaveAsset(src io.Reader, path string) (crc uint32, size int64, err error) {
func saveAsset(src io.Reader, path string) (crc uint32, size int64, err error) {
output, res := os.OpenFile(path, os.O_WRONLY|os.O_CREATE, 0666)
if res != nil {

View File

@ -9,6 +9,7 @@ import (
"net/http"
)
//AddChannelTopicTag adds a tag to a specified topic
func AddChannelTopicTag(w http.ResponseWriter, r *http.Request) {
// scan parameters

View File

@ -7,6 +7,7 @@ import (
"net/http"
)
//AddGroup adds a group to account identified by agent query param
func AddGroup(w http.ResponseWriter, r *http.Request) {
account, code, err := ParamAgentToken(r, true)

View File

@ -8,6 +8,7 @@ import (
"time"
)
//AddNodeAccount generate a new token to be used for account creation
func AddNodeAccount(w http.ResponseWriter, r *http.Request) {
if code, err := ParamAdminToken(r); err != nil {

View File

@ -10,6 +10,7 @@ import (
"time"
)
//AddNodeAccountAccess generate a new token to be use for account login reset
func AddNodeAccountAccess(w http.ResponseWriter, r *http.Request) {
params := mux.Vars(r)