我收到以下導(dǎo)入代碼的錯(cuò)誤:代碼:包主import ( "log" "net/http" "os" "github.com/emicklei/go-restful" "github.com/emicklei/go-restful/swagger" "./api")錯(cuò)誤:.\main.go:9: imported and not used: "_/c_/Users/aaaa/IdeaProjects/app/src/api"鑒于我有package apiapi 文件夾下存儲(chǔ)的文件,是否有導(dǎo)入不起作用的原因?我正在使用下面api在 main.go 中使用func main() { // to see what happens in the package, uncomment the following restful.TraceLogger(log.New(os.Stdout, "[restful] ", log.LstdFlags|log.Lshortfile)) wsContainer := restful.NewContainer() api := ApiResource{map[string]OxiResp{}} api.registerLogin(wsContainer) api.registerAccount(wsContainer) api.registerLostLogin(wsContainer) api.registerWallet(wsContainer)}
導(dǎo)入和未使用錯(cuò)誤
慕的地6264312
2021-08-16 19:13:35