Golang踩坑录-两种方式来读取文件一行所导致的问题

Akkuman ·
``` for { urlpath, err := allURLTxt.ReadString('\n') if err == io.EOF { logs.Info("读取字典完成,准备开始,请等待...") return urlList } urlpath = strings.TrimSpace(urlpath) urlList = append(urlList, baseurl+urlpath) } ```
#1