revel Questions
4
Solved
I'm trying to add a value to a variable string in golang, without use printf because I'm using revel framework and this is for a web enviroment instead of console, this is the case:
data := 14
res...
1
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "attach",
"mode": "debug",
"remotePath": "",
"port": 2345,
"host": "127.0.0.1",
"program": "revel.exe...
Electrotonus asked 15/12, 2016 at 18:56
3
I need to reference patients.json from patients.go, here's the folder structure:
If I do:
filepath.Abs("../../conf/patients.json")
it works for go test ./... but fails for revel run
If I do: ...
Miscellany asked 25/6, 2015 at 19:21
4
Solved
In order to use revel's even keyword in templates I would like to get the index of a map entry when iterating with range. Is there any way to do so?
My map has the structure:
map[string][]string
...
Baeyer asked 22/3, 2017 at 10:12
4
Solved
let me start by saying these are my first couple days of toying around in Go.
I'm trying to use the Revel framework with Gorm like this:
app/controllers/gorm.go
package controllers
import (
"f...
2
Coming from a python/django world, it'd be great to have something like a requirements.txt equivalent for go/revel. How can I do this? I know I can just write a requirements.txt file and then do so...
1
Solved
I'm attempting to parse a Datetime in revel from a json request. The request looks something like this:
{
"startedAt": "2017-06-01 10:39",
...
}
The struct it's being decoded into looks like t...
1
Solved
I'm trying to debug a revel app with visual studio but I can't get it to work.
I've seen this question how to debug revel framework(golang) application in visual studio code(vscode) but no answers...
Aurlie asked 16/6, 2017 at 12:58
4
Solved
I cracked my brain trying to make my code shorter and cleaner. The problem is in one function, that is working with different structs, that implements one interface.
In some cases I need the model...
Heteropolar asked 19/8, 2016 at 16:53
1
Solved
How to access range within range in Go templates?
Template:
{{range .Resume.Skills}}
{{.Name}}
{{.Level}}
{{range $item, $key := .Keywords}}
{{$key}}
{{$item}}
{{end}}
{{end}}
Struct:
t...
Orthopter asked 4/7, 2016 at 18:41
1
Solved
I am using Golang Revel for some web project and I did like 12 projects in that so far. In all of them I have a lot of code redundancy because of return types. Look at this two functions:
func (c ...
1
Solved
I am using the revel framework with the go language. Recently, when I run the following code:
import (
...
"net/url"
...
)
revel.INFO.Println(url.QueryEscape("http://hello.com"))
I get
INFO...
1
Solved
Using revel, golang 1.1.2, gorp, postgres 9.3.2 on heroku
Following robfig's List booking example
func (c App) ViewPosts(page int) revel.Result {
if page == 0 {
page = 1
}
var posts []*models...
Blent asked 12/1, 2014 at 10:36
1
© 2022 - 2024 — McMap. All rights reserved.