I turned on the moudle function in the environment variable
I turned on the moudle function in the environment variable
Don't change it yourself. It is automatically identified. When your project directory has go.mod, it will automatically enable
refer to this article: https://www.jianshu.com/p/c57.
Amway justforfunc https://www.youtube.com/chann.-sharp42-sharp43 period is all about the use of go modules.
personal experience: go module is much easier to manage than the previously used gvt ~
you have set up GO111MODULES=on, here, which means you need to have a go.mod file in the root directory of your project, and that's what your error report means. As for what you said about go mod init, it doesn't work? What is the wrong report?
my guess is that you are outside gopath and your project is not managed by VCS. If so, the solution is:
// module
go mod init MODULE_NAME
you can generate a go.mod file
have you ever used goquery? I want to use an agent to crawl. Does goquery support it? After looking for it, I don t seem to find ....
Overview: the younger brother s program can query the sql in the database and write it into excel performance by entering the database type, database connection string, executing sql or files containing sql. Currently, 25W pieces of data are exported,...
introduce Mutex into the object to ensure atomicity, but when the object is a value reference, it is found that the cable has no effect. What is its internal implementation logic? the code is as follows: package main import ( "fmt" ...
popularize the QR code what to do when 1 out of 1 million people cannot generate a QR code? ...
I want to package an ios sdk, instruction with gomobile bind instruction. There is always a unknown GOARCH: " " error in the execution of the sdk, instruction. The error is as follows: AndroidmacGOARCH, ...
has anyone ever used a reliable golang TCP services framework? the framework had better have the following two modules: 1. Session management of connections 2. The framework can customize the protocol ...
firewall, the integrated environment of system Centos7, lnmp.org, does not have the permission to run mysql. Iptables has been restarted. Refresh authorization error: Mysql user:Iptables: New processing: 1. Modify mysql configuration file vi ...
goal: golang service, prepare to get banner information of ip:port. if ip:port is http, you can get http response, if it is ssh service, you can get ssh service output information. Such as version information. pre-condition: the corresponding tcpAddr...
< hr > finally found that time.Sleep (100 * time.Millisecond) will affect the database. After removing it, I didn t encounter the problem of busy buffer . < hr > I have encountered some problems in converting a piece of data from Table 1 to Table ...
other people s project code is as follows jsonStr := `{"Name":"lepig", "Age":100}` abc := []byte(jsonStr) var result []string if err := json.Unmarshal(abc, &result); err != nil { fmt.Println(err) ...
how do I convert it? func GetPlan(c *gin.Context){ expect := c.PostForm("expect") prevexpect,_ := strconv.Atoi(PrevExpect()) sql := "SELECT * from plan pl " + "left JOIN program pr on pl.program_id = p...
I can accomplish all kinds of business requirements without this thing. What s the use of this? ...
etc rc.d rc.local and etc rc.local are both given execution permissions etc rc.d rc.local and etc rc.local are configured as follows -sharp! bin bash -sharp THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES -sharp -sharp It is highly advisable to ...
ask for advice background uses beego to build scenario description: background has some operations for each row of data, such as editing and deletion, etc. Now the server has passed the InsertFilter time before routing permission detection. now it j...
recently encountered a problem, go write websocket server how to achieve file upload function? Baidu Google did not find the answer they wanted. Is there any example of a third party or that can run successfully? tried to search for some answers, but ...
1. Is learning the go language and trying to write a website, one of the functions is that after the user logs in, all the file directories contained by the user are displayed on the home page of the user, that is, the file information is mapped. At pres...
whether this situation can only be judged by sync.Map and Channel ....
which language has more advantages in building short video websites? The mobile phone will be used later. Is there any similar source code reference for ? ...
similar to GORM, execute some functions before and after executing the query by registering them db.Callback().Create().Before("gorm:create").Register("update_created_at", updateCreated) db.Callback().Create().After("gorm:creat...
I am thinking about a question: how to downgrade the service? for example, there was an interface before, and an average was determined through the other three interfaces. Hypothetically, it doesn t necessarily make sense. To get the location of the ...