F5 go error: main redeclared in this block
The reason is that there cannot be more than one package main
under the same directory
Solution: create two folders hello and main respectively, put the files in them, and execute F5 again. There will be no problem.
Read More:
- [Solved] ERROR A malformed block was encountered while loading a block
- [GO] The entry file under the main package in golang calls other go file functions and appears undefined
- [How to Solve] Error: Invalid or corrupt jarfile…
- ads: How to Solve designguide Cannot to Open Error
- [Solved] MXNet Error: ImportError: cannot import name _LIB
- [Solved] PostgreSQL Error: ERROR: CURRENT TRANSACTION IS ABORTED, COMMANDS IGNORED UNTIL END OF TRANSA
- GO Exception Runnerw.exe: CreateProcess failed with error 21
- [Solved] C++ Compile Error: prerequisites are different [How to Solve]
- IDEA appears Module ** must not contain source root **. The root already belongs to module ** This kind of error solution
- [Solved] Hbase …ERROR: Unable to read .tableinfo from file:/hbaseData/data/default/table1/xxxx
- [Solved] prometheus Exception Exit Error: opening storage failed
- Execute an error under pytest cmd make sure your test modules/packages have valid Python names.
- How to Solve VMware Workstation Error: This virtual machine appears to be in use.
- The execution of ExecuteNonQuery by oraclecommand is suspended
- [Go] Solve can’t load package: cannot find module providing package github.com/xxxxx
- Mybatis error under Springboot project: Invalid bound statement (not found)
- [Solved] .\main.go:3:6: missing function body .\main.go:4:1: syntax error: unexpected semicolon or newline be
- [Solved] go cobra Error: required flag(s) “pkg-name” not set
- Cocoapods Upgrade Error: ffi * * * * [How to Solve]