CodeBench: Go-tuki — Chi + SQLite + httptest
- Golden example: todo-go/ (6/6 testit läpi) - todo-go.md golden reference - prompts/code-go.md koodigenerointi-prompti - Dockerfile.go-test (golang:1.23-alpine) - benchmark.mjs: LANG_CONFIG, parseTestOutput, prompt/golden-valinta Go:lle - Käyttö: node benchmark.mjs --lang go --models qwen2.5-coder:32b
This commit is contained in:
29
kipina-codebench/golden-examples/todo-go/models.go
Normal file
29
kipina-codebench/golden-examples/todo-go/models.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package main
|
||||
|
||||
// Todo represents a task with priority and status tracking.
|
||||
type Todo struct {
|
||||
ID int64 `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
DueDate *string `json:"due_date,omitempty"`
|
||||
Priority int64 `json:"priority"`
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
// CreateTodo is the request body for creating a new todo.
|
||||
type CreateTodo struct {
|
||||
Title string `json:"title"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
DueDate *string `json:"due_date,omitempty"`
|
||||
Priority *int64 `json:"priority,omitempty"`
|
||||
Status *string `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// UpdateTodo is the request body for updating an existing todo.
|
||||
type UpdateTodo struct {
|
||||
Title *string `json:"title,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
DueDate *string `json:"due_date,omitempty"`
|
||||
Priority *int64 `json:"priority,omitempty"`
|
||||
Status *string `json:"status,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user