Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 699 Bytes

File metadata and controls

26 lines (19 loc) · 699 Bytes

fn-pipe

CircleCI

Functions pipeline for golang projects

Basic Usage

    // create the pipeline
    p, err := NewPipeline(
    	func(a int) (int, int) { return a + 5, a - 5 }, // fn1
    	func(a int, b int) int { return a * b },        // fn2
    )
    
    // error checking
    if err != nil {
    	fmt.Fatalf("Error while creating pipeline -> %s", err)
    }
    
    // output the result which should be fn2(fn1(...args))
    err, res := p.ExecWith(0) // res = [-25]

Contributing

Please follow this link