Skip to content

An easy-to-use task runner and its surrounding toolset.

License

Notifications You must be signed in to change notification settings

edoger/zkits-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZKits Runner Library

ZKits Build Status Build status Coverage Status Codacy Badge Go Report Card Golang Version

About

This package is a library of ZKits project. This library provides a convenient subtask runner for applications. We can easily control the running order of subtasks and exit them in reverse order.

Install

go get -u -v github.com/edoger/zkits-runner

Usage

package main

import (
   "github.com/edoger/zkits-runner"
)

func main() {
    r := runner.New()
    err := r.Run(runner.NewTaskFromFunc(nil, func() error {
        // Do something.
        return nil
    }))

    // Wait system exit.
    if err := r.Wait(); err != nil {
        // Handle error.
    }
}

License

Apache-2.0