Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package main
func main() {
task := model.NewTask()
err := task.Create(model.Task{
Rate: "* * * * *",
Key: "hi world",
})
}
package model
// T struct
type T struct{}
// Task struct
type Task struct {
Key string
Rate string
}
// NewTask create a new task instance
func NewTask() T {
return T{}
}
// Create events
func (T) Create(t Task) ([]Event, error) {
var events []Event
return events, nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.