We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gin + cgo = error
error
package main import ( "fmt" "github.com/gin-gonic/gin" "net/http" ) /* int Add(int a, int b){ return a + b; } */ import "C" func main() { R := gin.Default() R.GET("/", func(context *gin.Context) { fmt.Println(C.Add(1,2)) context.String(http.StatusOK,"hello world") }) R.Run(":8080") }
The text was updated successfully, but these errors were encountered:
Use native http module is normal
package main import ( "fmt" "net/http" ) /* int Add(int a, int b){ return a + b; } */ import "C" func main() { http.HandleFunc("/", func(writer http.ResponseWriter, request *http.Request) { fmt.Println(C.Add(1,2),request.RequestURI) writer.Write([]byte("hello world")) }) http.ListenAndServe(":8080",nil) }
Sorry, something went wrong.
I have no this mistake here
No branches or pull requests
Description
gin + cgo =
error
How to reproduce
Expectations
Actual result
Environment
The text was updated successfully, but these errors were encountered: