Skip to content

Commit 50f0076

Browse files
authored
Tools (#220)
add link to tools book
1 parent 29d5eb2 commit 50f0076

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,17 @@ Let's try it out with some [sample data](testdata/access.log):
263263

264264
See [pkg.go.dev](https://pkg.go.dev/github.com/bitfield/script) for the full documentation, or read on for a summary.
265265

266+
[![The Power of Go: Tools cover image](img/tools.png)](https://bitfieldconsulting.com/books/tools)
267+
268+
The `script` package originated as an exercise in my book [The Power of Go: Tools](https://bitfieldconsulting.com/books/tools):
269+
270+
> *Not all software engineering is about writing applications. Developers also need tooling: programs and services to automate everyday tasks like configuring servers and containers, running builds and tests, deploying their applications, and so on. Why shouldn't we be able to use Go for that purpose, too?*
271+
>
272+
> *`script` is designed to make it easy to write Go programs that chain together operations into a pipeline, in the same way that shell scripts do, but with the robust type checking and error handling of a real programming language. You can use `script` to construct the sort of simple one‐off pipelines that would otherwise require the shell, or special‐purpose tools.*
273+
>
274+
> *So, when plain Go doesn’t provide a convenient way to solve a problem, you yourself can use it to implement a domain-specific “language” that does. In this case, we used Go to provide the language of Unix‐style pipelines. But we could have chosen any architecture we wanted to suit the problem. If Go doesn’t already provide the tool you need, use Go to build that tool, then use it.*\
275+
> —From the book
276+
266277
## Sources
267278

268279
These are functions that create a pipe with a given contents:

img/tools.png

120 KB
Loading

0 commit comments

Comments
 (0)