Remove useless comments
This commit is contained in:
parent
cc0440055a
commit
b9171867f6
@ -30,7 +30,7 @@ const (
|
||||
|
||||
func BotStart() {
|
||||
var err error
|
||||
fmt.Println(logo)
|
||||
fmt.Printf("%s\n", logo)
|
||||
//read config
|
||||
config.InitConfig()
|
||||
//Init Logger
|
||||
|
||||
@ -189,7 +189,7 @@ func bExport(m *tb.Message) {
|
||||
MIME: "text/plain",
|
||||
}
|
||||
bot.Send(m.Chat, exportFile)
|
||||
//不遗留本地文件
|
||||
|
||||
if exportFile.InCloud() != true || os.Remove(fileName) != nil {
|
||||
zap.S().Errorw("failed to export files")
|
||||
}
|
||||
|
||||
@ -182,7 +182,7 @@ func (c *Client) GetOutlookMails() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
//fmt.Println(string(content))
|
||||
|
||||
//这里的.需要转义,否则会按路径的方式解析
|
||||
if gjson.Get(string(content), "@odata\\.context").String() != "" {
|
||||
return nil
|
||||
|
||||
@ -57,13 +57,12 @@ func GetPathFiles(path string) []string {
|
||||
return t
|
||||
}
|
||||
|
||||
// GetRecentLogs 输入文件夹路径,返回最近n个log的路径,不到n个返回所有
|
||||
func GetRecentLogs(path string, n int) []string {
|
||||
var paths []string
|
||||
if !PathExists(path) {
|
||||
return paths
|
||||
}
|
||||
//path末尾检查/
|
||||
|
||||
if path[len(path)-1:] != "/" {
|
||||
path += "/"
|
||||
}
|
||||
@ -71,7 +70,6 @@ func GetRecentLogs(path string, n int) []string {
|
||||
d, _ := time.ParseDuration("-24h")
|
||||
//不到n个返回所有
|
||||
nt := Min(n, len(GetPathFiles(path)))
|
||||
//fmt.Println(nt)
|
||||
for i := 1; i <= nt; {
|
||||
if PathExists(path + data.Format("2006-01-02") + ".log") {
|
||||
paths = append(paths, data.Format("2006-01-02")+".log")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user