1234567891011121314151617181920212223242526272829303132 |
- package main
- import (
- "log"
- "dev.hexasoftware.com/hxs/prettylog"
- "dev.hexasoftware.com/x/seq"
- )
- func main() {
- prettylog.Global()
- t := seq.NewTasker()
- s := t.Task("RUN")
- s.Add(func(s *seq.Context) error {
- log.Println("Do everything here")
- s.Set("HELLO", 10)
- return nil
- })
- t.Exec("RUN", 1)
- s.Add(func(s *seq.Context) error {
- log.Println("Exec param:", s.Param(0), "Var:HELLO", s.Get("HELLO"))
- return nil
- })
- t.Exec("RUN", 1)
- }
|