flag 자체 구현

This commit is contained in:
2023-06-21 14:13:30 +09:00
parent 94b6d1499a
commit 0d8752e661
7 changed files with 197 additions and 27 deletions

View File

@ -16,12 +16,14 @@ import (
"syscall"
"time"
"repositories.action2quare.com/ayo/gocommon"
"repositories.action2quare.com/ayo/gocommon/flagx"
"repositories.action2quare.com/ayo/gocommon/logger"
"go.mongodb.org/mongo-driver/bson"
)
var linkupdate = flagx.String("updatelink", "", "")
func SortVersions(versions []string) []string {
sort.Slice(versions, func(i, j int) bool {
leftnum := 0
@ -204,10 +206,10 @@ func ReplyUpdateComplete() {
}
}()
if len(*gocommon.Linkupdate) > 0 {
cache := DeserializeMessageReplyCache(*gocommon.Linkupdate)
if len(*linkupdate) > 0 {
cache := DeserializeMessageReplyCache(*linkupdate)
if cache != nil {
os.Remove(*gocommon.Linkupdate)
os.Remove(*linkupdate)
if cache.ReplyWrap != nil {
cache.ReplyWrap.Update(cache.Replyaid, "업데이트 완료")
}