Just a simple site to publish surveys. Nothing fancy, mostly done because I need it.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
package features_survey
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"MY/webapp/data"
|
|
|
|
|
// _ "github.com/mattn/go-sqlite3"
|
|
|
|
|
// sq "github.com/Masterminds/squirrel"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func QueryData() data.Survey {
|
|
|
|
|
return data.Survey{
|
|
|
|
|
Title: "Sample Survey",
|
|
|
|
|
Description: "The description.",
|
|
|
|
|
CreatedOn: "01/20/26",
|
|
|
|
|
Respondents: 200,
|
|
|
|
|
State: "Finished",
|
|
|
|
|
Questions: []data.Question{
|
|
|
|
|
{
|
|
|
|
|
Id: 1,
|
|
|
|
|
Question: "Do you like HTML?",
|
|
|
|
|
Answer: true,
|
|
|
|
|
// TODO: just for prototyping, needs to be a better model
|
|
|
|
|
Result: 20,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Id: 2,
|
|
|
|
|
Question: "Do you like CSS?",
|
|
|
|
|
Answer: false,
|
|
|
|
|
Result: 11,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Id: 3,
|
|
|
|
|
Question: "Do you like JavaScript?",
|
|
|
|
|
Answer: true,
|
|
|
|
|
Result: 43,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Id: 4,
|
|
|
|
|
Question: "Are you a programmer?",
|
|
|
|
|
Answer: true,
|
|
|
|
|
Result: 28,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|