Guest User

Untitled

a guest
Jul 17th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4. sp "github.com/samuell/scipipe"
  5. )
  6.  
  7. func main() {
  8. hello := sp.Sh("echo foo > {o:out}")
  9. hello.OutPathFuncs["out"] = func() string {
  10. return "hello.txt"
  11. }
  12.  
  13. world := sp.Sh("echo $(cat {i:in}) World >> {o:out}")
  14. world.OutPathFuncs["bar"] = func() string {
  15. return world.GetInPath("in") + ".world.txt"
  16. }
  17.  
  18. world.InPorts["in"] = hello.OutPorts["out"]
  19.  
  20. hello.Init()
  21. world.Init()
  22.  
  23. <-world.OutPorts["out"]
  24. }
Add Comment
Please, Sign In to add comment