set the gometalinter check code using goland,. What does that mean? D: workspace www go_work bin gometalinter.exe --vendor --fast --enable-gc --tests --aggregate --disable=gotype D: workspace www go_work src apiserver model WARNING: exec: &q...
two tables, one is category, and the other is product, defined as follows: type Product struct { ProductId uint32 `gorm:"primary_key;type:int(11) unsigned auto_increment;"` Category Category `gorm:"ForeignKey:CateIDRef;"` ...
problem description the 19th rookie joined the Go language team, and the underlying service is Go-micro,gRPC. How can I get started quickly the environmental background of the problems and what methods you have tried after trying to read some tuto...
do you want to set both, has many and belongs to for Gorm s one-to-many relationships or just write on one side? it seems that the official website only writes on one side, not on both sides. http: gorm.io zh_CN docs has. ...
jwt is saved in localstorage. How to set http only? ...
is there a big difference in performance between Didi s golang json parsing library json-iterator go and its own encoding json? there is an article here that says, "after Go1.10, the performance of the standard library is not much different from t...
gin framework writes web app, to authenticate users with jwt, how to log out? The login logic is to compare the username and password, generate jwt, if correct, and then save the client to localstorage. question: what should be the logic for logg...
see the official website to explain that the function is to add a suffix to the directory where the package is installed to keep the output separate from the default version I am testing that the function is go build-installsuffix cgo and does not a...
what is wrong with this golang code? Ask the boss to take a look: this is a function registered by the user. The code is as follows: func Signup(c *gin.Context) { var r CreateRequest if err := c.Bind(&r); err != nil { SendResponse...
goland format code shortcut does not work. The shortcut key from Baidu to format code is CTRL+ALT+L , but the pop-up box below opens the password lock when pressed. question: how should goland format the code? ...
guys, I read the color code of the picture through imgo : height := imgo.GetImageHeight(img) [height] width := imgo.GetImageWidth(img) [width] imgMatrix := imgo.MustRead("F: GOPATH src code img hsq.jpg") f...
I want to write a comic platform server, comics will be divided into paid and free, how should I deal with these picture resources. If I put it on oss, how can I tell whether the requesting user has paid or not? under the guidance of which god, I would b...
Development environment: vagrant, vagrant installed on windows10 runs centos7, centos7 installs Golang and PostgreSQL, compiles and runs go code. problem: cannot connect to PostgreSQL using gorm. Gorm document is written as follows: : : 2...
golang debugging shows very little information, so how to debug? For example, the following compilation error is reported: [root@vagrant-dev web]-sharp go run main.go panic: invalid sql type (slice) for mysql goroutine 1 [running]: github.com jinzhu ...
I initialized go.mod in the Gopath src directory and wrote a package myself, but always compiled an error, but there was no problem using the package on github : Code: go.mod: package config import ( "fmt" ) func Config() { fmt...
for example, if the file name is test.tar.bz2, you can only get the bz2 extension through the path.Ext method. How can you get the tar.bz2 extension without knowing in advance whether it is a single extension or a compound extension? ...
colleagues developed under windows, I developed under ubuntu, I only changed a small part of a file, using git diff to view, the whole file has been modified by me, after comparison found to be the reason for different line breaks, how happy collaborativ...
I turned on the moudle function in the environment variable ...
just get the rendered post-HTML content, save it to a string variable, and do not output ...
the proto file I now define is as follows syntax = "proto2"; message Test1 {} message Test2 { required Test1 test1 = 1; } message Test3 { required Test2 test2 = 1; } then I will get a go file with the approximate content type Test...
1, how to get his id? by jumping from one page to another http: localhost:5000 -sharp Role roleTopower?id=3 is how to get the value of the current id ...
for example, create a project through the project package topthink think composer create-project topthink think=5.0.* tp5 --prefer-dist if you use composer update only to update the package in the project, composer show can only view the version...
promsie solves the problem of asynchronous callback nesting, but will the use of promsie cause blocking? Interface Asynchronous Writing: app.use( test ,function(req,res){ fn() } fn is an asynchronous query database function. Because fn is asynch...
how can Visual Studio Code open a browser to display HTML? directly in the editor ...
have you ever encountered a situation in which react-cookie cannot create multiple cookies at the same time? ...