GameShow/questions/storage/question.go

20 lines
289 B
Go
Executable File

package storage
import (
"strings"
)
const prefix_question = "question_"
type Question struct {
Pair
}
func NewQuestion(text string) Question {
return Question{New(prefix_question+NewID(), text)}
}
func IsQuestion(ID string) bool {
return strings.HasPrefix(ID, prefix_question)
}