Skip to content

Instantly share code, notes, and snippets.

@matthewmueller
Created January 28, 2017 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewmueller/42ec69752e992793e7de9e902ff79da2 to your computer and use it in GitHub Desktop.
Save matthewmueller/42ec69752e992793e7de9e902ff79da2 to your computer and use it in GitHub Desktop.
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