func onetask() context.Context { l := list.New() l.PushBack("task one") ctx := context.WithValue(context.Background(), "tasks", l) ctx = context.WithValue(ctx, "logger", log.New(os.Stdout, "testing: ", log.LstdFlags)) return ctx }
func notasks() context.Context { ctx := context.WithValue(context.Background(), "tasks", list.New()) ctx = context.WithValue(ctx, "logger", log.New(os.Stdout, "testing: ", log.LstdFlags)) return ctx }
func init() { taskctx = context.WithValue(taskctx, "tasks", list.New()) taskctx = context.WithValue(taskctx, "logger", log.New(os.Stdout, "taskd: ", log.LstdFlags)) http.Handle("/", handlers.CompressHandler(handlers.LoggingHandler(os.Stdout, router()))) }