1
0
mirror of https://github.com/beego/bee.git synced 2025-06-26 19:10:19 +00:00

add cmd 'bee update' to update self

just notice once a day if there is a new version
This commit is contained in:
wangle
2020-08-02 16:17:02 +08:00
committed by askuy
parent e0ea0abf5b
commit 9c63635169
9 changed files with 119 additions and 58 deletions

View File

@ -4,14 +4,15 @@ import (
"crypto/md5"
"errors"
"fmt"
"github.com/beego/bee/internal/pkg/utils"
beeLogger "github.com/beego/bee/logger"
"io/ioutil"
"os"
"path"
"path/filepath"
"strings"
"time"
"github.com/beego/bee/internal/pkg/utils"
beeLogger "github.com/beego/bee/logger"
)
// write to file
@ -191,7 +192,7 @@ func GetFilterContent(content string, seg string) string {
res := ""
for _, s := range strings.Split(content, "\n") {
s = strings.TrimSpace(strings.TrimPrefix(s, seg))
var have = false
var have bool
for _,except := range CompareExcept{
if strings.HasPrefix(s, except) {
have = true