Last active
July 17, 2018 22:18
-
-
Save samuell/cc28464275b531ba2a33ee97708b8f1e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
sp "github.com/samuell/scipipe" | |
) | |
func main() { | |
hello := sp.Sh("echo foo > {o:out}") | |
hello.OutPathFuncs["out"] = func() string { | |
return "hello.txt" | |
} | |
world := sp.Sh("echo $(cat {i:in}) World >> {o:out}") | |
world.OutPathFuncs["bar"] = func() string { | |
return world.GetInPath("in") + ".world.txt" | |
} | |
world.InPorts["in"] = hello.OutPorts["out"] | |
hello.Init() | |
world.Init() | |
<-world.OutPorts["out"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment