mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
more golint cleanup
This commit is contained in:
parent
c637bf635f
commit
c16534fd52
@ -18,7 +18,7 @@ func AddChannelTopic(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
channelSlot, guid, err, code := getChannelSlot(r, true)
|
||||
channelSlot, guid, code, err := getChannelSlot(r, true)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
@ -28,7 +28,7 @@ func AddChannelTopicAsset(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
channelSlot, guid, err, code := getChannelSlot(r, true)
|
||||
channelSlot, guid, code, err := getChannelSlot(r, true)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
@ -22,7 +22,7 @@ func AddChannelTopicTag(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
channelSlot, guid, err, code := getChannelSlot(r, false)
|
||||
channelSlot, guid, code, err := getChannelSlot(r, false)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//GetCardDetail retrieves attributes attributes assigned to card
|
||||
func GetCardDetail(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
account, code, err := ParamAgentToken(r, false)
|
||||
|
@ -11,6 +11,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
//GetCardProfileImage retrieves contacts profile image
|
||||
func GetCardProfileImage(w http.ResponseWriter, r *http.Request) {
|
||||
var data []byte
|
||||
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//GetCardProfile retrieves contact's public profile
|
||||
func GetCardProfile(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
account, code, err := ParamAgentToken(r, false)
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
//GetCards retrieves all accounts contacts
|
||||
func GetCards(w http.ResponseWriter, r *http.Request) {
|
||||
var cardRevisionSet bool
|
||||
var cardRevision int64
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//GetChannelDetail retrieve channel top level attributes
|
||||
func GetChannelDetail(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// scan parameters
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
//GetChannelSubjectField retrieve base64 decoded field from channel subject
|
||||
func GetChannelSubjectField(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// scan parameters
|
||||
@ -18,7 +19,7 @@ func GetChannelSubjectField(w http.ResponseWriter, r *http.Request) {
|
||||
elements := strings.Split(field, ".")
|
||||
|
||||
// get channel stlot
|
||||
channelSlot, _, err, code := getChannelSlot(r, false)
|
||||
channelSlot, _, code, err := getChannelSlot(r, false)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
//GetChannelSummary retrieves latest channel topic
|
||||
func GetChannelSummary(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// scan parameters
|
||||
|
@ -14,7 +14,7 @@ func GetChannelTopic(w http.ResponseWriter, r *http.Request) {
|
||||
params := mux.Vars(r)
|
||||
topicID := params["topicID"]
|
||||
|
||||
channelSlot, _, err, code := getChannelSlot(r, false)
|
||||
channelSlot, _, code, err := getChannelSlot(r, false)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
@ -55,7 +55,7 @@ func isViewer(guid string, groups []store.Group) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func getChannelSlot(r *http.Request, member bool) (slot store.ChannelSlot, guid string, err error, code int) {
|
||||
func getChannelSlot(r *http.Request, member bool) (slot store.ChannelSlot, guid string, code int, err error) {
|
||||
|
||||
// scan parameters
|
||||
params := mux.Vars(r)
|
||||
|
@ -15,7 +15,7 @@ func GetChannelTopicAsset(w http.ResponseWriter, r *http.Request) {
|
||||
topicID := params["topicID"]
|
||||
assetID := params["assetID"]
|
||||
|
||||
channelSlot, _, err, code := getChannelSlot(r, true)
|
||||
channelSlot, _, code, err := getChannelSlot(r, true)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
@ -14,7 +14,7 @@ func GetChannelTopicAssets(w http.ResponseWriter, r *http.Request) {
|
||||
params := mux.Vars(r)
|
||||
topicID := params["topicID"]
|
||||
|
||||
channelSlot, guid, err, code := getChannelSlot(r, true)
|
||||
channelSlot, guid, code, err := getChannelSlot(r, true)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
@ -20,7 +20,7 @@ func GetChannelTopicDetail(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
channelSlot, _, err, code := getChannelSlot(r, false)
|
||||
channelSlot, _, code, err := getChannelSlot(r, false)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
@ -21,7 +21,7 @@ func GetChannelTopicSubjectField(w http.ResponseWriter, r *http.Request) {
|
||||
field := params["field"]
|
||||
elements := strings.Split(field, ".")
|
||||
|
||||
channelSlot, _, err, code := getChannelSlot(r, false)
|
||||
channelSlot, _, code, err := getChannelSlot(r, false)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
@ -22,7 +22,7 @@ func GetChannelTopicTagSubjectField(w http.ResponseWriter, r *http.Request) {
|
||||
field := params["field"]
|
||||
elements := strings.Split(field, ".")
|
||||
|
||||
channelSlot, _, err, code := getChannelSlot(r, false)
|
||||
channelSlot, _, code, err := getChannelSlot(r, false)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
@ -28,7 +28,7 @@ func GetChannelTopicTags(w http.ResponseWriter, r *http.Request) {
|
||||
var count int
|
||||
|
||||
// load channel slot
|
||||
channelSlot, _, err, code := getChannelSlot(r, false)
|
||||
channelSlot, _, code, err := getChannelSlot(r, false)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
@ -24,7 +24,7 @@ func GetChannelTopics(w http.ResponseWriter, r *http.Request) {
|
||||
var countSet bool
|
||||
var count int
|
||||
|
||||
channelSlot, _, err, code := getChannelSlot(r, false)
|
||||
channelSlot, _, code, err := getChannelSlot(r, false)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
@ -15,7 +15,7 @@ func RemoveChannelTopic(w http.ResponseWriter, r *http.Request) {
|
||||
channelID := params["channelID"]
|
||||
topicID := params["topicID"]
|
||||
|
||||
channelSlot, guid, err, code := getChannelSlot(r, true)
|
||||
channelSlot, guid, code, err := getChannelSlot(r, true)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
@ -15,7 +15,7 @@ func RemoveChannelTopicAsset(w http.ResponseWriter, r *http.Request) {
|
||||
topicID := params["topicID"]
|
||||
assetID := params["assetID"]
|
||||
|
||||
channelSlot, guid, err, code := getChannelSlot(r, true)
|
||||
channelSlot, guid, code, err := getChannelSlot(r, true)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
@ -16,7 +16,7 @@ func RemoveChannelTopicTag(w http.ResponseWriter, r *http.Request) {
|
||||
topicID := params["topicID"]
|
||||
tagID := params["tagID"]
|
||||
|
||||
channelSlot, guid, err, code := getChannelSlot(r, false)
|
||||
channelSlot, guid, code, err := getChannelSlot(r, false)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
@ -24,7 +24,7 @@ func SetChannelTopicConfirmed(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
channelSlot, _, err, code := getChannelSlot(r, true)
|
||||
channelSlot, _, code, err := getChannelSlot(r, true)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
@ -21,7 +21,7 @@ func SetChannelTopicSubject(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
channelSlot, guid, err, code := getChannelSlot(r, true)
|
||||
channelSlot, guid, code, err := getChannelSlot(r, true)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
@ -22,7 +22,7 @@ func SetChannelTopicTagSubject(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
channelSlot, guid, err, code := getChannelSlot(r, false)
|
||||
channelSlot, guid, code, err := getChannelSlot(r, false)
|
||||
if err != nil {
|
||||
ErrResponse(w, code, err)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user