Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
34 views

I am trying to define a foreign key field in a Beego ORM model, but the application crashes during RunSyncdb with the following panic: panic: runtime error: invalid memory address or nil pointer ...
Lomo zhu's user avatar
1 vote
1 answer
112 views

how can I run and pack with .env file, use bee-cli?, so the app.conf can read .env params with brace, like this: appname = ${APP_NAME} In my VSCode launch.json,I set like this: "configurations&...
Andy.Zhao's user avatar
  • 258
1 vote
0 answers
85 views

func (this *MainController) Post() { file, header, err := this.GetFile("file") if err != nil { panic(fmt.Sprintf("failed to get uploaded file: %v", err)) } ...
NoOne's user avatar
  • 19
1 vote
0 answers
66 views

I define a struct in beego and add form tag to realtive fields, and the input type="datetime-local" in html struct code: type TaskModifyForm struct { ID int `form:"...
kenny xiao's user avatar
0 votes
1 answer
77 views

I want to display data using beego and golang. But I have a problem because I get is nested json data and I can't find a way to solve it, can you help me cause i'm new in beego and golang. here's the ...
Edelweiss's user avatar
1 vote
0 answers
423 views

I'm using Beego and I don't think the annotation routing works as documented. My router.go looks like this: package routers import ( beego "github.com/beego/beego/v2/server/web" &...
Andy's user avatar
  • 2,160
2 votes
1 answer
407 views

I am trying to write a function that will validate a Google id token. The oauth2 package requires me to pass in the context when creating a new service, like this: package services import ( "...
Andy's user avatar
  • 2,160
1 vote
0 answers
320 views

ERROR: *controllers.ListController does not implement web.ControllerInterface (wrong type for Init method) have Init(*"github.com/astaxie/beego/context".Context, string, string, interface ...
gargi sharma's user avatar
0 votes
1 answer
304 views

I am trying to build an api in beego. I have to make a controller and a model for this project. Model has a database table but the table is not in my database. Beego automatically creates the table in ...
Md. Sakhawath Hossain's user avatar
0 votes
1 answer
953 views

I am trying to Set Data to Redis at (6 am, 12 pm, 6 pm and 12 am). But all I can do is setting an expiration time for data caching in redis. Is there any way in Golang to do this? Code: err := client....
Md. Sakhawath Hossain's user avatar
1 vote
1 answer
808 views

I am trying to create a rest API. I have already a database. I want to create a struct linked to a database table. But when I run the project beego automatically creates an "id" primary key ...
Md. Sakhawath Hossain's user avatar
0 votes
1 answer
2k views

package main import ( "github.com/beego/beego/v2/client/orm/migration" ) // DO NOT MODIFY type AddConstraintToUser_20210928_223906 struct { migration.Migration } // DO NOT MODIFY ...
Aashish Passrija's user avatar
0 votes
0 answers
570 views

I did not have programming background and I learned to code completely by Google search so please excuse me if the question is not totally clear. I tried to search a this issue but could not find an ...
VII's user avatar
  • 309
0 votes
1 answer
444 views

I am using Beego/Golang as my backend and having an issue with No 'Access-Control-Allow-Origin' header when trying to fetch a URL from my domain. I searched on Google and put this in func main() but ...
VII's user avatar
  • 309
3 votes
0 answers
452 views

I'm building a simple project that has an API and serves a dashboard alongside it. My goal is to have a namespace router (for swagger docs) and a restful router (for the web pages) in the same project,...
nycynik's user avatar
  • 7,571
1 vote
0 answers
341 views

Is there anybody that success implement h2c(HTTP/2 Plain text) Protocol in beego as a server? I have tried to use http/2 from golang.org/x/net/http2 package using this approach https://beego.me/docs/...
Fitrah Elly Firdaus's user avatar
0 votes
1 answer
317 views

I am using a select query to fetch some rows from my table using the following code. func (f *UserFilter) ListAllUsers(srch string) (cnt int64, l []*ListResp, err error) { o := orm.NewOrm() ...
웃웃웃웃웃's user avatar
0 votes
1 answer
117 views

I load a list of items from the database and would like to return it as Json. it works well but the response is not a json object, its a string with is a problem on the receiver side. var products []*...
Andre's user avatar
  • 722
4 votes
1 answer
797 views

I have the following function in the BaseModel that I can use anywhere. func (d *Dummy) Save() (int64, error) { o := orm.NewOrm() var err error var count int64 if d.Id == 0 { ...
open source guy's user avatar
0 votes
0 answers
186 views

I am not able to match response body with expected value Here is the code i have tried to POST method to create resource func TestCreateFileShare(t *testing.T) { var jsonStr = []byte(`{ &...
tech01's user avatar
  • 1
0 votes
1 answer
770 views

I'm using Beego to develop a web server. I used beego.Controller to process the POST requests. In my case, the POST request contains a JSON: { "name": "titi", "...
Yves's user avatar
  • 12.6k
-1 votes
1 answer
150 views

There is an open-source project: in the application I do not find the httpport config, when I build and run it, there use the 8080. I want to change it. but how?
user7693832's user avatar
  • 6,971
0 votes
1 answer
573 views

I tried to Dockerize a Beego application, but the HTML rendering is not finding HTML files stored inside the view/templates directory. FROM golang:1.13 WORKDIR /go/src/fileUpload COPY . . RUN go get ...
Aswathy Ashok's user avatar
0 votes
1 answer
446 views

I want to set the Coins struct's Address as a foreign key of Accounts struct's address, how to set it in beego orm? type Coins struct { Id int `orm:"auto"` Address string `...
holiday peng's user avatar
0 votes
2 answers
737 views

I have my Go app running in https mode. I am using the Beego framework. My app.conf looks like : appname = myproject httpsport = 10555 httpport = 8082 runmode = prod EnableHTTP = false EnableHTTPS = ...
OMKAR HINGMIRE's user avatar

1
2 3 4 5 6