The github.com/trustmaster/goflow package is useful for creating data flow-based applications. It tries to abstract the concepts so that you can write components and connect them together using a custom network. This recipe will recreate the application discussed in Chapter 9, Testing Go Code, but will do so using the goflow package.
How to do it...
These steps cover writing and running your application:
- From your Terminal or console application,createa new directory called~/projects/go-programming-cookbook/chapter12/goflowand navigate to this directory.
- Run the following command:
$ go mod init github.com/PacktPublishing/Go-Programming-Cookbook-Second-Edition/chapter12/goflow
You should see a file calledgo.modthat contains the following:
module github.com/PacktPublishing/Go-Programming-Cookbook-Second-Edition/chapter12/goflow
-
...