diff --git a/.golangci.yml b/.golangci.yml index 85e4d155..dfd6e3b4 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -50,4 +50,12 @@ issues: linters-settings: funlen: lines: 66 - statements: 40 \ No newline at end of file + statements: 40 + +issues: + include: + - EXC0002 # disable excluding of issues about comments from golint + exclude-rules: + - linters: + - stylecheck + text: "ST1000:" diff --git a/miniprogram/config/config.go b/miniprogram/config/config.go index 7edf4354..1be6bd2a 100644 --- a/miniprogram/config/config.go +++ b/miniprogram/config/config.go @@ -1,3 +1,4 @@ +//Package config 小程序config配置 package config import ( diff --git a/miniprogram/subscribe/subscribe.go b/miniprogram/subscribe/subscribe.go index ba34d852..aec74614 100644 --- a/miniprogram/subscribe/subscribe.go +++ b/miniprogram/subscribe/subscribe.go @@ -42,6 +42,7 @@ type DataItem struct { Value string `json:"value"` } +//TemplateItem template item type TemplateItem struct { PriTmplID string `json:"priTmplId"` Title string `json:"title"` @@ -50,6 +51,7 @@ type TemplateItem struct { Type int64 `json:"type"` } +//TemplateList template list type TemplateList struct { util.CommonError Data []TemplateItem `json:"data"` @@ -70,7 +72,7 @@ func (s *Subscribe) Send(msg *Message) (err error) { return util.DecodeWithCommonError(response, "Send") } -// 获取当前帐号下的个人模板列表 +//ListTemplates 获取当前帐号下的个人模板列表 // https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/subscribe-message/subscribeMessage.getTemplateList.html func (s *Subscribe) ListTemplates() (*TemplateList, error) { accessToken, err := s.GetAccessToken() diff --git a/officialaccount/device/authorize.go b/officialaccount/device/authorize.go index 221bd83b..13683560 100644 --- a/officialaccount/device/authorize.go +++ b/officialaccount/device/authorize.go @@ -1,3 +1,4 @@ +//Package device 设备相关接口 package device import ( diff --git a/officialaccount/user/tag.go b/officialaccount/user/tag.go index 7e2b348c..d2f07a1d 100644 --- a/officialaccount/user/tag.go +++ b/officialaccount/user/tag.go @@ -132,7 +132,7 @@ func (user *User) GetTag() (tags []*TagInfo, err error) { return result.Tags, nil } -//OpenidListByTag 获取标签下粉丝列表 +//OpenIDListByTag 获取标签下粉丝列表 func (user *User) OpenIDListByTag(tagID int32, nextOpenID ...string) (userList *TagOpenIDList, err error) { accessToken, err := user.GetAccessToken() if err != nil { diff --git a/openplatform/context/accessToken.go b/openplatform/context/accessToken.go index f33d506b..ed41e425 100644 --- a/openplatform/context/accessToken.go +++ b/openplatform/context/accessToken.go @@ -1,3 +1,4 @@ +//Package context 开放平台相关context package context import ( diff --git a/util/time.go b/util/time.go index 4306f837..91d31bab 100644 --- a/util/time.go +++ b/util/time.go @@ -2,7 +2,7 @@ package util import "time" -//GetCurrTs return current timestamps +//GetCurrTS return current timestamps func GetCurrTS() int64 { return time.Now().Unix() }