Questions tagged [buffalo]

Buffalo is a Go web development eco-system.

Some Resources:

60 questions
1
vote
0 answers

How can I set a custom path helper for a Resource in go Buffalo?

With a GET route, I can do app.GET("/", HomeHandler).Name("CustomName") But with a Resource, the .Name() function is no longer available
1
vote
1 answer

How can I checked if the visitor is logged in from a plush template? Using the go Buffalo framework

How can I check if a visitor is logged in from within a template using the Go Buffalo web framework? Specifically, I am working on a project that utilizes the Buffalo framework and I need to be able to determine if a user is currently logged in or…
1
vote
1 answer

Golang use bash environment variables in Buffalo database.yml

I'm new to Go and Buffalo, and am attempting use my bash environment variables in my database.yaml I attempted to do the following in my database.yaml, but it fails to interpret the value of my bash environment var localUser user: ${localUser} I…
micah
  • 838
  • 7
  • 21
1
vote
0 answers

ValidateCreate function not called on ValidateAndCreate

I'm usign buffalo to build a simple backend to store values. I have a Target struct defined as follow: type Target struct { ID uuid.UUID `json:"id" db:"id"` Name string `json:"name" db:"name"` Description …
delrum
  • 869
  • 1
  • 7
1
vote
1 answer

Difficulty installing go buffalo using go mod on windows

I am very new to golang. I am trying to work with the gomod. Trying to explore the go buffalo framework. But finding a bit of difficulty in installing that. What I have done: I saw that go get is nomore supported for buffalo and so switched to go…
Sayan Dey
  • 771
  • 6
  • 13
1
vote
2 answers

Unable to GET form from embedded html

I have a search engine with a backend in GoLang & Buffalo, I'm new to web programming, and I'm sure this is a stupid problem. I have a nav-bar with a search bar, and another search bar in the body. The nav-bar is an embedded html (plush…
Dialvive
  • 356
  • 7
  • 19
1
vote
1 answer

GoBuffalo CSRF issue on production build

When I run the application in development mode, I do not have this issue. But when I build for production and run that binary and whenever I try to submit a form I get below error - level=error time="2020-07-26T17:32:36+05:30" msg="CSRF token…
ArunKolhapur
  • 5,805
  • 4
  • 18
  • 31
1
vote
1 answer

Render SelectTag() with options from an array of models

I have a User model and a App model in my application. App has a belongs_to relation with User model. In the template apps/new.plush.html I need to render the list of users as a drop down selection. I have implemented forms.Selectable interface like…
ArunKolhapur
  • 5,805
  • 4
  • 18
  • 31
1
vote
0 answers

Creating static binaries from Go and C/C++ code (using cgo)

I am developing an application in Go that needs to call some of my company's C++ code. Thus far, I have successfully achieved the following: Written C wrappers that enable instantiation of C++ objects Compiled my new C/C++ code into a shared…
kgrimes2
  • 136
  • 3
  • 12
1
vote
1 answer

show can set disabled pop error: mysql select one: sql: no rows in result set

err = db.Find(model) err == "mysql select one: sql: no rows in result set" I don't think this is a mistake. How do I turn it off in buffalo/pop? and errors.Is(err, sql.ErrNoRows) === false can't unwrap the error fmt.Println(111) for…
hookover
  • 13
  • 4
1
vote
2 answers

Circleci and GoBuffalo challenge

I'm currently trying to get GoBuffalo and CircleCi working, but so far without luck. Circleci fails on the "buffalo build" step with the error message: My config.yaml: version: 2 jobs: khw_build_and_test: docker: - image:…
Tino
  • 3,340
  • 5
  • 44
  • 74
1
vote
2 answers

Trouble setting CSRF token in sending a tweet from a Golang Buffalo webapp

I am having trouble with a Go Buffalo web app I am trying to build. I basically have a standard form on the front end that, when clicked, is supposed to send a tweet to the Users twitter account. I get a "500: CSRF Not found" when doing so. I am…
JamWill
  • 134
  • 3
  • 21
1
vote
0 answers

GoBuffalo and Authboss (authentication system) integration

I'm trying to use authboss (https://github.com/volatiletech/authboss) with GoBuffalo (https://github.com/gobuffalo/buffalo). I'm still learning Go and I think this is a good exercise. I created a new GoBuffalo app, you can find it here:…
Fred Hors
  • 3,258
  • 3
  • 25
  • 71
1
vote
0 answers

How to import nested local file

Before: actions ├── app.go ├── upload_sessions.go ├── upload_sessions_test.go What I want to change it to: actions ├── app.go ├── v2 │   ├── upload_sessions.go │   └── upload_sessions_test.go When I try nesting the upload_sessions.go file in the…
bigpotato
  • 26,262
  • 56
  • 178
  • 334
1
vote
1 answer

How to add new route to autogenerate resources?

please help me, I want add new route/func to generate resource (etc. users). app.Resource("/users", UsersResource{}) I found func addRoute, but doesn't work. func (a *App) addRoute(method string, url string, h Handler) *RouteInfo { ... My idea is…