v2.2.0
This commit is contained in:
1 parent
5603f26ed6
commit
f4689d073c
72 files changed
+1914
-2860
No files matched your search
@@ -4,13 +4,13 @@ import (
|
||||
"encoding/json"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"pmail/db"
|
||||
"pmail/dto"
|
||||
"pmail/dto/parsemail"
|
||||
"pmail/models"
|
||||
"pmail/services/auth"
|
||||
"pmail/utils/context"
|
||||
)
|
||||
|
||||
func GetAttachments(ctx *dto.Context, emailId int, cid string) (string, []byte) {
|
||||
func GetAttachments(ctx *context.Context, emailId int, cid string) (string, []byte) {
|
||||
|
||||
// 获取邮件内容
|
||||
var email models.Email
|
||||
@@ -35,7 +35,7 @@ func GetAttachments(ctx *dto.Context, emailId int, cid string) (string, []byte)
|
||||
return "", nil
|
||||
}
|
||||
|
||||
func GetAttachmentsByIndex(ctx *dto.Context, emailId int, index int) (string, []byte) {
|
||||
func GetAttachmentsByIndex(ctx *context.Context, emailId int, index int) (string, []byte) {
|
||||
|
||||
// 获取邮件内容
|
||||
var email models.Email
|
||||
|
||||
@@ -10,16 +10,16 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
"os"
|
||||
"pmail/db"
|
||||
"pmail/dto"
|
||||
"pmail/models"
|
||||
"pmail/utils/context"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// HasAuth 检查当前用户是否有某个邮件的auth
|
||||
func HasAuth(ctx *dto.Context, email *models.Email) bool {
|
||||
func HasAuth(ctx *context.Context, email *models.Email) bool {
|
||||
// 获取当前用户的auth
|
||||
var auth []models.UserAuth
|
||||
err := db.Instance.Select(&auth, db.WithContext(ctx, "select * from user_auth where user_id = ?"), ctx.UserInfo.ID)
|
||||
err := db.Instance.Select(&auth, db.WithContext(ctx, "select * from user_auth where user_id = ?"), ctx.UserID)
|
||||
if err != nil {
|
||||
log.WithContext(ctx).Errorf("SQL error:%+v", err)
|
||||
return false
|
||||
@@ -30,7 +30,7 @@ func HasAuth(ctx *dto.Context, email *models.Email) bool {
|
||||
if userAuth.EmailAccount == "*" {
|
||||
hasAuth = true
|
||||
break
|
||||
} else if strings.Contains(email.Bcc, ctx.UserInfo.Account) || strings.Contains(email.Cc, ctx.UserInfo.Account) || strings.Contains(email.To, ctx.UserInfo.Account) {
|
||||
} else if strings.Contains(email.Bcc, ctx.UserAccount) || strings.Contains(email.Cc, ctx.UserAccount) || strings.Contains(email.To, ctx.UserAccount) {
|
||||
hasAuth = true
|
||||
break
|
||||
}
|
||||
|
||||
@@ -3,14 +3,14 @@ package del_email
|
||||
import (
|
||||
"fmt"
|
||||
"pmail/db"
|
||||
"pmail/dto"
|
||||
"pmail/models"
|
||||
"pmail/services/auth"
|
||||
"pmail/utils/array"
|
||||
"pmail/utils/context"
|
||||
"pmail/utils/errors"
|
||||
)
|
||||
|
||||
func DelEmail(ctx *dto.Context, ids []int) error {
|
||||
func DelEmail(ctx *context.Context, ids []int) error {
|
||||
var emails []*models.Email
|
||||
|
||||
db.Instance.Select(&emails, db.WithContext(ctx, fmt.Sprintf("select * from email where id in (%s)", array.Join(ids, ","))))
|
||||
@@ -23,7 +23,8 @@ func DelEmail(ctx *dto.Context, ids []int) error {
|
||||
}
|
||||
}
|
||||
|
||||
_, err := db.Instance.Exec(db.WithContext(ctx, fmt.Sprintf("delete from email where id in (%s)", array.Join(ids, ","))))
|
||||
//_, err := db.Instance.Exec(db.WithContext(ctx, fmt.Sprintf("delete from email where id in (%s)", array.Join(ids, ","))))
|
||||
_, err := db.Instance.Exec(db.WithContext(ctx, fmt.Sprintf("update email set status = 3 where id in (%s)", array.Join(ids, ","))))
|
||||
if err != nil {
|
||||
return errors.Wrap(err)
|
||||
}
|
||||
|
||||
@@ -6,13 +6,13 @@ import (
|
||||
"fmt"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"pmail/db"
|
||||
"pmail/dto"
|
||||
"pmail/dto/parsemail"
|
||||
"pmail/models"
|
||||
"pmail/utils/context"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func GetEmailDetail(ctx *dto.Context, id int, markRead bool) (*models.Email, error) {
|
||||
func GetEmailDetail(ctx *context.Context, id int, markRead bool) (*models.Email, error) {
|
||||
// 获取邮件内容
|
||||
var email models.Email
|
||||
err := db.Instance.Get(&email, db.WithContext(ctx, "select * from email where id = ?"), id)
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"pmail/dto"
|
||||
"pmail/models"
|
||||
"pmail/utils/array"
|
||||
"pmail/utils/context"
|
||||
"pmail/utils/errors"
|
||||
)
|
||||
|
||||
@@ -17,7 +18,7 @@ type GroupItem struct {
|
||||
Children []*GroupItem `json:"children"`
|
||||
}
|
||||
|
||||
func DelGroup(ctx *dto.Context, groupId int) (bool, error) {
|
||||
func DelGroup(ctx *context.Context, groupId int) (bool, error) {
|
||||
allGroupIds := getAllChildId(ctx, groupId)
|
||||
allGroupIds = append(allGroupIds, groupId)
|
||||
|
||||
@@ -27,7 +28,7 @@ func DelGroup(ctx *dto.Context, groupId int) (bool, error) {
|
||||
return false, errors.Wrap(err)
|
||||
}
|
||||
|
||||
res, err := trans.Exec(db.WithContext(ctx, fmt.Sprintf("delete from `group` where id in (%s) and user_id =?", array.Join(allGroupIds, ","))), ctx.UserInfo.ID)
|
||||
res, err := trans.Exec(db.WithContext(ctx, fmt.Sprintf("delete from `group` where id in (%s) and user_id =?", array.Join(allGroupIds, ","))), ctx.UserID)
|
||||
if err != nil {
|
||||
trans.Rollback()
|
||||
return false, errors.Wrap(err)
|
||||
@@ -53,10 +54,10 @@ type id struct {
|
||||
Id int `db:"id"`
|
||||
}
|
||||
|
||||
func getAllChildId(ctx *dto.Context, rootId int) []int {
|
||||
func getAllChildId(ctx *context.Context, rootId int) []int {
|
||||
var ids []id
|
||||
var ret []int
|
||||
db.Instance.Select(&ids, db.WithContext(ctx, "select id from `group` where parent_id=? and user_id=?"), rootId, ctx.UserInfo.ID)
|
||||
db.Instance.Select(&ids, db.WithContext(ctx, "select id from `group` where parent_id=? and user_id=?"), rootId, ctx.UserID)
|
||||
for _, item := range ids {
|
||||
ret = array.Merge(ret, getAllChildId(ctx, item.Id))
|
||||
ret = append(ret, item.Id)
|
||||
@@ -65,12 +66,12 @@ func getAllChildId(ctx *dto.Context, rootId int) []int {
|
||||
}
|
||||
|
||||
// GetGroupInfoList 获取全部的分组
|
||||
func GetGroupInfoList(ctx *dto.Context) []*GroupItem {
|
||||
func GetGroupInfoList(ctx *context.Context) []*GroupItem {
|
||||
return buildChildren(ctx, 0)
|
||||
}
|
||||
|
||||
// MoveMailToGroup 将某封邮件移动到某个分组中
|
||||
func MoveMailToGroup(ctx *dto.Context, mailId []int, groupId int) bool {
|
||||
func MoveMailToGroup(ctx *context.Context, mailId []int, groupId int) bool {
|
||||
res, err := db.Instance.Exec(db.WithContext(ctx, fmt.Sprintf("update email set group_id=? where id in (%s)", array.Join(mailId, ","))), groupId)
|
||||
if err != nil {
|
||||
log.WithContext(ctx).Errorf("SQL Error:%+v", err)
|
||||
@@ -85,10 +86,10 @@ func MoveMailToGroup(ctx *dto.Context, mailId []int, groupId int) bool {
|
||||
return rowNum > 0
|
||||
}
|
||||
|
||||
func buildChildren(ctx *dto.Context, parentId int) []*GroupItem {
|
||||
func buildChildren(ctx *context.Context, parentId int) []*GroupItem {
|
||||
var ret []*GroupItem
|
||||
var rootGroup []*models.Group
|
||||
err := db.Instance.Select(&rootGroup, db.WithContext(ctx, "select * from `group` where parent_id=? and user_id=?"), parentId, ctx.UserInfo.ID)
|
||||
err := db.Instance.Select(&rootGroup, db.WithContext(ctx, "select * from `group` where parent_id=? and user_id=?"), parentId, ctx.UserID)
|
||||
|
||||
if err != nil {
|
||||
log.WithContext(ctx).Errorf("SQL Error:%v", err)
|
||||
@@ -107,8 +108,8 @@ func buildChildren(ctx *dto.Context, parentId int) []*GroupItem {
|
||||
|
||||
}
|
||||
|
||||
func GetGroupList(ctx *dto.Context) []*models.Group {
|
||||
func GetGroupList(ctx *context.Context) []*models.Group {
|
||||
var ret []*models.Group
|
||||
db.Instance.Select(&ret, db.WithContext(ctx, "select * from `group` where user_id=?"), ctx.UserInfo.ID)
|
||||
db.Instance.Select(&ret, db.WithContext(ctx, "select * from `group` where user_id=?"), ctx.UserID)
|
||||
return ret
|
||||
}
|
||||
@@ -6,19 +6,20 @@ import (
|
||||
"pmail/db"
|
||||
"pmail/dto"
|
||||
"pmail/models"
|
||||
"pmail/utils/context"
|
||||
)
|
||||
|
||||
func GetEmailList(ctx *dto.Context, tag string, keyword string, offset, limit int) (emailList []*models.Email, total int) {
|
||||
func GetEmailList(ctx *context.Context, tag string, keyword string, offset, limit int) (emailList []*models.Email, total int) {
|
||||
|
||||
querySQL, queryParams := genSQL(ctx, false, tag, keyword, offset, limit)
|
||||
counterSQL, counterParams := genSQL(ctx, true, tag, keyword, offset, limit)
|
||||
|
||||
err := db.Instance.Select(&emailList, querySQL, queryParams...)
|
||||
err := db.Instance.Select(&emailList, db.WithContext(ctx, querySQL), queryParams...)
|
||||
if err != nil {
|
||||
log.Errorf("SQL ERROR: %s ,Error:%s", querySQL, err)
|
||||
}
|
||||
|
||||
err = db.Instance.Get(&total, counterSQL, counterParams...)
|
||||
err = db.Instance.Get(&total, db.WithContext(ctx, counterSQL), counterParams...)
|
||||
if err != nil {
|
||||
log.Errorf("SQL ERROR: %s ,Error:%s", querySQL, err)
|
||||
}
|
||||
@@ -26,7 +27,7 @@ func GetEmailList(ctx *dto.Context, tag string, keyword string, offset, limit in
|
||||
return
|
||||
}
|
||||
|
||||
func genSQL(ctx *dto.Context, counter bool, tag, keyword string, offset, limit int) (string, []any) {
|
||||
func genSQL(ctx *context.Context, counter bool, tag, keyword string, offset, limit int) (string, []any) {
|
||||
|
||||
sql := "select * from email where 1=1 "
|
||||
if counter {
|
||||
@@ -46,6 +47,8 @@ func genSQL(ctx *dto.Context, counter bool, tag, keyword string, offset, limit i
|
||||
if tagInfo.Status != -1 {
|
||||
sql += " and status =? "
|
||||
sqlParams = append(sqlParams, tagInfo.Status)
|
||||
} else {
|
||||
sql += " and status != 3"
|
||||
}
|
||||
|
||||
if tagInfo.GroupId != -1 {
|
||||
@@ -58,7 +61,7 @@ func genSQL(ctx *dto.Context, counter bool, tag, keyword string, offset, limit i
|
||||
sqlParams = append(sqlParams, "%"+keyword+"%", "%"+keyword+"%")
|
||||
}
|
||||
|
||||
sql += " limit ? offset ?"
|
||||
sql += " order by id desc limit ? offset ?"
|
||||
sqlParams = append(sqlParams, limit, offset)
|
||||
|
||||
return sql, sqlParams
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package match
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"pmail/dto/parsemail"
|
||||
"pmail/utils/context"
|
||||
)
|
||||
|
||||
const (
|
||||
RuleTypeRegex = "regex"
|
||||
RuleTypeContains = "contains"
|
||||
RuleTypeEq = "equal"
|
||||
)
|
||||
|
||||
type Match interface {
|
||||
Match(ctx *context.Context, email *parsemail.Email) bool
|
||||
}
|
||||
|
||||
func getFieldContent(field string, email *parsemail.Email) string {
|
||||
switch field {
|
||||
case "ReplyTo":
|
||||
b, _ := json.Marshal(email.ReplyTo)
|
||||
return string(b)
|
||||
case "From":
|
||||
b, _ := json.Marshal(email.From)
|
||||
return string(b)
|
||||
case "Subject":
|
||||
return email.Subject
|
||||
case "To":
|
||||
b, _ := json.Marshal(email.To)
|
||||
return string(b)
|
||||
case "Bcc":
|
||||
b, _ := json.Marshal(email.Bcc)
|
||||
return string(b)
|
||||
case "Cc":
|
||||
b, _ := json.Marshal(email.Cc)
|
||||
return string(b)
|
||||
case "Text":
|
||||
return string(email.Text)
|
||||
case "Html":
|
||||
return string(email.HTML)
|
||||
case "Sender":
|
||||
b, _ := json.Marshal(email.Sender)
|
||||
return string(b)
|
||||
case "Content":
|
||||
b := string(email.HTML)
|
||||
b2 := string(email.Text)
|
||||
return b + b2
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package match
|
||||
|
||||
import (
|
||||
"pmail/dto/parsemail"
|
||||
"pmail/utils/context"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type ContainsMatch struct {
|
||||
Rule string
|
||||
Field string
|
||||
}
|
||||
|
||||
func NewContainsMatch(field, rule string) *ContainsMatch {
|
||||
return &ContainsMatch{
|
||||
Rule: rule,
|
||||
Field: field,
|
||||
}
|
||||
}
|
||||
|
||||
func (r *ContainsMatch) Match(ctx *context.Context, email *parsemail.Email) bool {
|
||||
content := getFieldContent(r.Field, email)
|
||||
return strings.Contains(content, r.Rule)
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package match
|
||||
|
||||
import (
|
||||
"pmail/dto/parsemail"
|
||||
"pmail/utils/context"
|
||||
)
|
||||
|
||||
type EqualMatch struct {
|
||||
Rule string
|
||||
Field string
|
||||
}
|
||||
|
||||
func NewEqualMatch(field, rule string) *EqualMatch {
|
||||
return &EqualMatch{
|
||||
Rule: rule,
|
||||
Field: field,
|
||||
}
|
||||
}
|
||||
|
||||
func (r *EqualMatch) Match(ctx *context.Context, email *parsemail.Email) bool {
|
||||
content := getFieldContent(r.Field, email)
|
||||
return content == r.Rule
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package match
|
||||
|
||||
import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
"pmail/dto/parsemail"
|
||||
"pmail/utils/context"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
type RegexMatch struct {
|
||||
Rule string
|
||||
Field string
|
||||
}
|
||||
|
||||
func NewRegexMatch(field, rule string) *RegexMatch {
|
||||
return &RegexMatch{
|
||||
Rule: rule,
|
||||
Field: field,
|
||||
}
|
||||
}
|
||||
|
||||
func (r *RegexMatch) Match(ctx *context.Context, email *parsemail.Email) bool {
|
||||
content := getFieldContent(r.Field, email)
|
||||
|
||||
match, err := regexp.MatchString(r.Rule, content)
|
||||
|
||||
if err != nil {
|
||||
log.WithContext(ctx).Errorf("rule regex error %v", err)
|
||||
}
|
||||
|
||||
return match
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package match
|
||||
|
||||
import (
|
||||
"pmail/models"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestRegexMatch_Match(t *testing.T) {
|
||||
r := NewRegexMatch("Subject", "\\d+")
|
||||
|
||||
ret := r.Match(nil, &models.Email{
|
||||
Subject: "111",
|
||||
})
|
||||
|
||||
if !ret {
|
||||
t.Errorf("失败")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package rule
|
||||
|
||||
import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cast"
|
||||
"pmail/config"
|
||||
"pmail/db"
|
||||
"pmail/dto"
|
||||
"pmail/dto/parsemail"
|
||||
"pmail/models"
|
||||
"pmail/services/rule/match"
|
||||
"pmail/utils/context"
|
||||
"pmail/utils/send"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func GetAllRules(ctx *context.Context) []*dto.Rule {
|
||||
var res []*models.Rule
|
||||
var err error
|
||||
if ctx == nil {
|
||||
err = db.Instance.Select(&res, "select * from rule order by sort desc")
|
||||
} else {
|
||||
err = db.Instance.Select(&res, db.WithContext(ctx, "select * from rule where user_id=? order by sort desc"), ctx.UserID)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
log.WithContext(ctx).Errorf("sqlERror :%v", err)
|
||||
}
|
||||
var ret []*dto.Rule
|
||||
for _, rule := range res {
|
||||
ret = append(ret, (&dto.Rule{}).Decode(rule))
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
func MatchRule(ctx *context.Context, rule *dto.Rule, email *parsemail.Email) bool {
|
||||
|
||||
for _, r := range rule.Rules {
|
||||
var m match.Match
|
||||
|
||||
switch r.Type {
|
||||
case match.RuleTypeRegex:
|
||||
m = match.NewRegexMatch(r.Field, r.Rule)
|
||||
case match.RuleTypeContains:
|
||||
m = match.NewContainsMatch(r.Field, r.Rule)
|
||||
case match.RuleTypeEq:
|
||||
m = match.NewEqualMatch(r.Field, r.Rule)
|
||||
}
|
||||
if m == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if !m.Match(ctx, email) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func DoRule(ctx *context.Context, rule *dto.Rule, email *parsemail.Email) {
|
||||
switch rule.Action {
|
||||
case dto.READ:
|
||||
email.IsRead = 1
|
||||
case dto.DELETE:
|
||||
email.Status = 3
|
||||
case dto.FORWARD:
|
||||
if strings.Contains(rule.Params, config.Instance.Domain) {
|
||||
log.WithContext(ctx).Errorf("Forward Error! loop forwarding!")
|
||||
return
|
||||
}
|
||||
|
||||
err := send.Forward(nil, email, rule.Params)
|
||||
if err != nil {
|
||||
log.WithContext(ctx).Errorf("Forward Error:%v", err)
|
||||
}
|
||||
case dto.MOVE:
|
||||
email.GroupId = cast.ToInt(rule.Params)
|
||||
}
|
||||
}
|
||||
@@ -5,15 +5,15 @@ import (
|
||||
"os"
|
||||
"pmail/config"
|
||||
"pmail/db"
|
||||
"pmail/dto"
|
||||
"pmail/models"
|
||||
"pmail/utils/array"
|
||||
"pmail/utils/context"
|
||||
"pmail/utils/errors"
|
||||
"pmail/utils/file"
|
||||
"pmail/utils/password"
|
||||
)
|
||||
|
||||
func GetDatabaseSettings(ctx *dto.Context) (string, string, error) {
|
||||
func GetDatabaseSettings(ctx *context.Context) (string, string, error) {
|
||||
configData, err := ReadConfig()
|
||||
if err != nil {
|
||||
return "", "", errors.Wrap(err)
|
||||
@@ -26,7 +26,7 @@ func GetDatabaseSettings(ctx *dto.Context) (string, string, error) {
|
||||
return configData.DbType, configData.DbDSN, nil
|
||||
}
|
||||
|
||||
func GetAdminPassword(ctx *dto.Context) (string, error) {
|
||||
func GetAdminPassword(ctx *context.Context) (string, error) {
|
||||
|
||||
users := []*models.User{}
|
||||
err := db.Instance.Select(&users, "select * from user")
|
||||
@@ -41,7 +41,7 @@ func GetAdminPassword(ctx *dto.Context) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
func SetAdminPassword(ctx *dto.Context, account, pwd string) error {
|
||||
func SetAdminPassword(ctx *context.Context, account, pwd string) error {
|
||||
encodePwd := password.Encode(pwd)
|
||||
res, err := db.Instance.Exec(db.WithContext(ctx, "INSERT INTO user (account, name, password) VALUES (?, 'admin',?)"), account, encodePwd)
|
||||
if err != nil {
|
||||
@@ -58,7 +58,7 @@ func SetAdminPassword(ctx *dto.Context, account, pwd string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func SetDatabaseSettings(ctx *dto.Context, dbType, dbDSN string) error {
|
||||
func SetDatabaseSettings(ctx *context.Context, dbType, dbDSN string) error {
|
||||
configData, err := ReadConfig()
|
||||
if err != nil {
|
||||
return errors.Wrap(err)
|
||||
@@ -68,6 +68,10 @@ func SetDatabaseSettings(ctx *dto.Context, dbType, dbDSN string) error {
|
||||
return errors.New("dbtype error")
|
||||
}
|
||||
|
||||
if dbDSN == "" {
|
||||
return errors.New("DSN error")
|
||||
}
|
||||
|
||||
configData.DbType = dbType
|
||||
configData.DbDSN = dbDSN
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"pmail/dto"
|
||||
"pmail/i18n"
|
||||
"pmail/services/auth"
|
||||
"pmail/utils/context"
|
||||
"pmail/utils/errors"
|
||||
)
|
||||
|
||||
@@ -19,7 +19,7 @@ type DNSItem struct {
|
||||
Tips string `json:"tips"`
|
||||
}
|
||||
|
||||
func GetDNSSettings(ctx *dto.Context) ([]*DNSItem, error) {
|
||||
func GetDNSSettings(ctx *context.Context) ([]*DNSItem, error) {
|
||||
configData, err := ReadConfig()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package setup
|
||||
|
||||
import (
|
||||
"pmail/dto"
|
||||
"pmail/signal"
|
||||
"pmail/utils/context"
|
||||
"pmail/utils/errors"
|
||||
)
|
||||
|
||||
// Finish 标记初始化完成
|
||||
func Finish(ctx *dto.Context) error {
|
||||
func Finish(ctx *context.Context) error {
|
||||
cfg, err := ReadConfig()
|
||||
if err != nil {
|
||||
return errors.Wrap(err)
|
||||
|
||||
Reference in new issue
Block a user