Skip to content

Commit

Permalink
补全 golint (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
silenceper authored Aug 27, 2020
1 parent 2e191c0 commit 3014901
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 4 deletions.
10 changes: 9 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,12 @@ issues:
linters-settings:
funlen:
lines: 66
statements: 40
statements: 40

issues:
include:
- EXC0002 # disable excluding of issues about comments from golint
exclude-rules:
- linters:
- stylecheck
text: "ST1000:"
1 change: 1 addition & 0 deletions miniprogram/config/config.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//Package config 小程序config配置
package config

import (
Expand Down
4 changes: 3 additions & 1 deletion miniprogram/subscribe/subscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand All @@ -50,6 +51,7 @@ type TemplateItem struct {
Type int64 `json:"type"`
}

//TemplateList template list
type TemplateList struct {
util.CommonError
Data []TemplateItem `json:"data"`
Expand All @@ -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()
Expand Down
1 change: 1 addition & 0 deletions officialaccount/device/authorize.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//Package device 设备相关接口
package device

import (
Expand Down
2 changes: 1 addition & 1 deletion officialaccount/user/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions openplatform/context/accessToken.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//Package context 开放平台相关context
package context

import (
Expand Down
2 changes: 1 addition & 1 deletion util/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package util

import "time"

//GetCurrTs return current timestamps
//GetCurrTS return current timestamps
func GetCurrTS() int64 {
return time.Now().Unix()
}

0 comments on commit 3014901

Please sign in to comment.