├── .github └── workflows │ └── test.yml ├── .gitignore ├── LICENSE ├── README.md ├── battery ├── 1 │ ├── battery.go │ ├── battery_integration_test.go │ ├── battery_test.go │ ├── cmd │ │ └── battery │ │ │ └── main.go │ ├── go.mod │ ├── go.sum │ ├── test.txtar │ └── testdata │ │ └── pmset.txt └── 2 │ ├── battery.go │ ├── battery_test.go │ ├── go.mod │ ├── go.sum │ ├── test.txtar │ └── testdata │ └── battery.json ├── count ├── 1 │ ├── go.mod │ ├── main.go │ └── test.txtar ├── 2 │ ├── cmd │ │ └── count │ │ │ └── main.go │ ├── count.go │ ├── count_test.go │ ├── go.mod │ └── test.txtar ├── 3 │ ├── cmd │ │ └── count │ │ │ └── main.go │ ├── count.go │ ├── count_test.go │ ├── go.mod │ └── test.txtar ├── 4 │ ├── cmd │ │ └── count │ │ │ └── main.go │ ├── count.go │ ├── count_test.go │ ├── go.mod │ ├── test.txtar │ └── testdata │ │ └── three_lines.txt ├── 5 │ ├── cmd │ │ └── count │ │ │ └── main.go │ ├── count.go │ ├── count_test.go │ ├── go.mod │ ├── go.sum │ ├── test.txtar │ └── testdata │ │ ├── script │ │ ├── count_counts_lines_from_stdin.txtar │ │ └── count_uses_path_arg_as_input.txtar │ │ └── three_lines.txt ├── 6 │ ├── cmd │ │ └── count │ │ │ └── main.go │ ├── count.go │ ├── count_test.go │ ├── go.mod │ ├── go.sum │ ├── test.txtar │ └── testdata │ │ ├── script │ │ ├── count_counts_lines_from_stdin.txtar │ │ └── count_uses_multiple_paths_as_input.txtar │ │ └── three_lines.txt ├── 7 │ ├── cmd │ │ ├── lines │ │ │ └── main.go │ │ └── words │ │ │ └── main.go │ ├── count.go │ ├── count_test.go │ ├── go.mod │ ├── go.sum │ ├── test.txtar │ └── testdata │ │ ├── script │ │ ├── lines_counts_lines_from_stdin.txtar │ │ ├── words_and_lines_take_multiple_paths_as_input.txtar │ │ └── words_counts_words_from_stdin.txtar │ │ └── three_lines.txt ├── 8 │ ├── cmd │ │ └── count │ │ │ └── main.go │ ├── count.go │ ├── count_test.go │ ├── go.mod │ ├── go.sum │ ├── test.txtar │ └── testdata │ │ ├── script │ │ ├── count_counts_lines_with_lines_flag.txtar │ │ └── count_counts_words_by_default.txtar │ │ └── three_lines.txt └── 9 │ ├── cmd │ └── count │ │ └── main.go │ ├── count.go │ ├── count_test.go │ ├── go.mod │ ├── go.sum │ ├── test.txtar │ └── testdata │ ├── script │ ├── count_counts_bytes_with_bytes_flag.txtar │ ├── count_counts_lines_with_lines_flag.txtar │ ├── count_counts_words_by_default.txtar │ └── count_errors_when_bytes_and_lines_flags_combined.txtar │ └── three_lines.txt ├── findgo ├── 1 │ ├── go.mod │ ├── main.go │ ├── test.txtar │ └── testdata │ │ └── tree │ │ ├── file.go │ │ ├── subfolder │ │ └── subfolder.go │ │ └── subfolder2 │ │ ├── another.go │ │ └── file.go ├── 2 │ ├── go.mod │ ├── main.go │ ├── test.txtar │ └── testdata │ │ └── tree │ │ ├── file.go │ │ ├── subfolder │ │ └── subfolder.go │ │ └── subfolder2 │ │ ├── another.go │ │ └── file.go ├── 3 │ ├── cmd │ │ └── findgo │ │ │ └── main.go │ ├── findgo.go │ ├── findgo_test.go │ ├── go.mod │ ├── go.sum │ ├── test.txtar │ └── testdata │ │ └── tree │ │ ├── file.go │ │ ├── subfolder │ │ └── subfolder.go │ │ └── subfolder2 │ │ ├── another.go │ │ └── file.go └── 4 │ ├── cmd │ └── findgo │ │ └── main.go │ ├── findgo.go │ ├── findgo_test.go │ ├── go.mod │ ├── go.sum │ ├── test.txtar │ └── testdata │ ├── files.zip │ └── tree │ ├── file.go │ ├── subfolder │ └── subfolder.go │ └── subfolder2 │ ├── another.go │ └── file.go ├── greet └── 1 │ ├── cmd │ └── greet │ │ └── main.go │ ├── go.mod │ ├── go.sum │ ├── greet.go │ ├── greet_test.go │ ├── test.txtar │ └── testdata │ └── script │ └── greet.txtar ├── hello ├── 1 │ ├── go.mod │ ├── main.go │ └── test.txtar ├── 2 │ ├── cmd │ │ └── hello │ │ │ └── main.go │ ├── go.mod │ ├── hello.go │ └── test.txtar ├── 3 │ ├── cmd │ │ ├── hello │ │ │ └── main.go │ │ └── hellosrv │ │ │ └── main.go │ ├── go.mod │ ├── hello.go │ ├── hello_test.go │ └── test.txtar └── 4 │ ├── cmd │ └── hello │ │ └── main.go │ ├── go.mod │ ├── hello.go │ ├── hello_test.go │ └── test.txtar ├── howlong └── 1 │ ├── cmd │ └── howlong │ │ └── main.go │ ├── foo.txt │ ├── go.mod │ ├── howlong.go │ ├── howlong_test.go │ └── test.txtar ├── img └── cover.png ├── kv ├── 1 │ ├── go.mod │ ├── go.sum │ ├── kv.go │ ├── kv_test.go │ ├── test.txtar │ └── testdata │ │ └── invalid.store └── 2 │ ├── cmd │ └── kv │ │ └── main.go │ ├── go.mod │ ├── go.sum │ ├── kv.go │ ├── kv_test.go │ ├── test.txtar │ └── testdata │ ├── invalid.store │ └── script │ ├── kv_all_fails_when_store_unreadable.txtar │ ├── kv_all_lists_all_pairs.txtar │ ├── kv_get_fails_when_store_unreadable.txtar │ ├── kv_get_fails_with_no_key.txtar │ ├── kv_get_retrieves_single_value_from_store.txtar │ ├── kv_get_shows_error_for_nonexistent_key.txtar │ ├── kv_set_creates_store_if_necessary.txtar │ ├── kv_set_fails_when_store_cannot_be_saved.txtar │ ├── kv_set_fails_when_store_is_invalid.txtar │ ├── kv_set_fails_with_no_value.txtar │ ├── kv_set_updates_existing_store.txtar │ ├── kv_with_no_args_prints_usage.txtar │ └── kv_with_unknown_verb_shows_usage.txtar ├── loc └── 1 │ ├── go.mod │ ├── go.sum │ ├── main.go │ └── test.txtar ├── match └── 1 │ ├── cmd │ └── match │ │ └── main.go │ ├── go.mod │ ├── go.sum │ ├── match.go │ ├── match_test.go │ ├── test.txtar │ └── testdata │ └── script │ └── matches_lines_from_stdin.txtar ├── older └── 1 │ ├── cmd │ └── older │ │ └── main.go │ ├── go.mod │ ├── go.sum │ ├── older.go │ ├── older_test.go │ └── test.txtar ├── pipeline └── 1 │ ├── go.mod │ ├── go.sum │ ├── pipeline.go │ ├── pipeline_test.go │ ├── test.txtar │ └── testdata │ └── hello.txt ├── prom └── 1 │ ├── go.mod │ ├── go.sum │ ├── prom.go │ ├── prom_test.go │ ├── test.txtar │ └── testdata │ └── config.yaml ├── run_all_testscripts.sh ├── run_testscript.sh ├── safewriter └── 1 │ ├── go.mod │ ├── main.go │ └── test.txtar ├── shell ├── 1 │ ├── cmd │ │ └── shell │ │ │ └── main.go │ ├── go.mod │ ├── go.sum │ ├── shell.go │ ├── shell_test.go │ └── test.txtar ├── 2 │ ├── cmd │ │ └── shell │ │ │ └── main.go │ ├── go.mod │ ├── go.sum │ ├── shell.go │ ├── shell_test.go │ └── test.txtar ├── 3 │ ├── cmd │ │ └── shell │ │ │ └── main.go │ ├── go.mod │ ├── go.sum │ ├── shell.go │ ├── shell_test.go │ └── test.txtar └── 4 │ ├── cmd │ └── shell │ │ └── main.go │ ├── go.mod │ ├── go.sum │ ├── shell.go │ ├── shell_test.go │ ├── test.txtar │ └── testdata │ └── script │ └── shell_writes_transcript.txtar ├── visitors └── 1 │ ├── go.mod │ ├── log.txt │ ├── main.go │ └── test.txtar ├── weather ├── 1 │ ├── go.mod │ ├── main.go │ └── test.txtar ├── 2 │ ├── go.mod │ ├── main.go │ └── test.txtar ├── 3 │ ├── cmd │ │ └── weather │ │ │ └── main.go │ ├── go.mod │ ├── go.sum │ ├── test.txtar │ ├── testdata │ │ ├── weather.json │ │ └── weather_invalid.json │ ├── weather.go │ └── weather_test.go ├── 4 │ ├── cmd │ │ └── weather │ │ │ └── main.go │ ├── go.mod │ ├── go.sum │ ├── test.txtar │ ├── testdata │ │ ├── weather.json │ │ └── weather_invalid.json │ ├── weather.go │ └── weather_test.go ├── 5 │ ├── cmd │ │ └── weather │ │ │ └── main.go │ ├── go.mod │ ├── go.sum │ ├── test.txtar │ ├── testdata │ │ ├── weather.json │ │ └── weather_invalid.json │ ├── weather.go │ └── weather_test.go └── 6 │ ├── cmd │ └── weather │ │ └── main.go │ ├── go.mod │ ├── go.sum │ ├── test.txtar │ ├── testdata │ ├── weather.json │ └── weather_invalid.json │ ├── weather.go │ └── weather_test.go └── writer ├── 1 ├── go.mod ├── go.sum ├── test.txtar ├── writer.go └── writer_test.go └── 2 ├── cmd └── writefile │ └── main.go ├── go.mod ├── go.sum ├── test.txtar ├── testdata └── script │ └── writefile.txtar ├── writer.go └── writer_test.go /.github/workflows/test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/.github/workflows/test.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/README.md -------------------------------------------------------------------------------- /battery/1/battery.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/battery/1/battery.go -------------------------------------------------------------------------------- /battery/1/battery_integration_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/battery/1/battery_integration_test.go -------------------------------------------------------------------------------- /battery/1/battery_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/battery/1/battery_test.go -------------------------------------------------------------------------------- /battery/1/cmd/battery/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/battery/1/cmd/battery/main.go -------------------------------------------------------------------------------- /battery/1/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/battery/1/go.mod -------------------------------------------------------------------------------- /battery/1/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/battery/1/go.sum -------------------------------------------------------------------------------- /battery/1/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/battery/1/test.txtar -------------------------------------------------------------------------------- /battery/1/testdata/pmset.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/battery/1/testdata/pmset.txt -------------------------------------------------------------------------------- /battery/2/battery.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/battery/2/battery.go -------------------------------------------------------------------------------- /battery/2/battery_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/battery/2/battery_test.go -------------------------------------------------------------------------------- /battery/2/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/battery/2/go.mod -------------------------------------------------------------------------------- /battery/2/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/battery/2/go.sum -------------------------------------------------------------------------------- /battery/2/test.txtar: -------------------------------------------------------------------------------- 1 | exec go test 2 | -------------------------------------------------------------------------------- /battery/2/testdata/battery.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/battery/2/testdata/battery.json -------------------------------------------------------------------------------- /count/1/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bitfield/count 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /count/1/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/1/main.go -------------------------------------------------------------------------------- /count/1/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/1/test.txtar -------------------------------------------------------------------------------- /count/2/cmd/count/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/2/cmd/count/main.go -------------------------------------------------------------------------------- /count/2/count.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/2/count.go -------------------------------------------------------------------------------- /count/2/count_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/2/count_test.go -------------------------------------------------------------------------------- /count/2/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bitfield/count 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /count/2/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/2/test.txtar -------------------------------------------------------------------------------- /count/3/cmd/count/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/3/cmd/count/main.go -------------------------------------------------------------------------------- /count/3/count.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/3/count.go -------------------------------------------------------------------------------- /count/3/count_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/3/count_test.go -------------------------------------------------------------------------------- /count/3/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bitfield/count 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /count/3/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/3/test.txtar -------------------------------------------------------------------------------- /count/4/cmd/count/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/4/cmd/count/main.go -------------------------------------------------------------------------------- /count/4/count.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/4/count.go -------------------------------------------------------------------------------- /count/4/count_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/4/count_test.go -------------------------------------------------------------------------------- /count/4/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bitfield/count 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /count/4/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/4/test.txtar -------------------------------------------------------------------------------- /count/4/testdata/three_lines.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 -------------------------------------------------------------------------------- /count/5/cmd/count/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/5/cmd/count/main.go -------------------------------------------------------------------------------- /count/5/count.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/5/count.go -------------------------------------------------------------------------------- /count/5/count_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/5/count_test.go -------------------------------------------------------------------------------- /count/5/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/5/go.mod -------------------------------------------------------------------------------- /count/5/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/5/go.sum -------------------------------------------------------------------------------- /count/5/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/5/test.txtar -------------------------------------------------------------------------------- /count/5/testdata/script/count_counts_lines_from_stdin.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/5/testdata/script/count_counts_lines_from_stdin.txtar -------------------------------------------------------------------------------- /count/5/testdata/script/count_uses_path_arg_as_input.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/5/testdata/script/count_uses_path_arg_as_input.txtar -------------------------------------------------------------------------------- /count/5/testdata/three_lines.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 -------------------------------------------------------------------------------- /count/6/cmd/count/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/6/cmd/count/main.go -------------------------------------------------------------------------------- /count/6/count.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/6/count.go -------------------------------------------------------------------------------- /count/6/count_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/6/count_test.go -------------------------------------------------------------------------------- /count/6/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/6/go.mod -------------------------------------------------------------------------------- /count/6/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/6/go.sum -------------------------------------------------------------------------------- /count/6/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/6/test.txtar -------------------------------------------------------------------------------- /count/6/testdata/script/count_counts_lines_from_stdin.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/6/testdata/script/count_counts_lines_from_stdin.txtar -------------------------------------------------------------------------------- /count/6/testdata/script/count_uses_multiple_paths_as_input.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/6/testdata/script/count_uses_multiple_paths_as_input.txtar -------------------------------------------------------------------------------- /count/6/testdata/three_lines.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 -------------------------------------------------------------------------------- /count/7/cmd/lines/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/7/cmd/lines/main.go -------------------------------------------------------------------------------- /count/7/cmd/words/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/7/cmd/words/main.go -------------------------------------------------------------------------------- /count/7/count.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/7/count.go -------------------------------------------------------------------------------- /count/7/count_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/7/count_test.go -------------------------------------------------------------------------------- /count/7/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/7/go.mod -------------------------------------------------------------------------------- /count/7/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/7/go.sum -------------------------------------------------------------------------------- /count/7/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/7/test.txtar -------------------------------------------------------------------------------- /count/7/testdata/script/lines_counts_lines_from_stdin.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/7/testdata/script/lines_counts_lines_from_stdin.txtar -------------------------------------------------------------------------------- /count/7/testdata/script/words_and_lines_take_multiple_paths_as_input.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/7/testdata/script/words_and_lines_take_multiple_paths_as_input.txtar -------------------------------------------------------------------------------- /count/7/testdata/script/words_counts_words_from_stdin.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/7/testdata/script/words_counts_words_from_stdin.txtar -------------------------------------------------------------------------------- /count/7/testdata/three_lines.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 -------------------------------------------------------------------------------- /count/8/cmd/count/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/8/cmd/count/main.go -------------------------------------------------------------------------------- /count/8/count.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/8/count.go -------------------------------------------------------------------------------- /count/8/count_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/8/count_test.go -------------------------------------------------------------------------------- /count/8/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/8/go.mod -------------------------------------------------------------------------------- /count/8/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/8/go.sum -------------------------------------------------------------------------------- /count/8/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/8/test.txtar -------------------------------------------------------------------------------- /count/8/testdata/script/count_counts_lines_with_lines_flag.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/8/testdata/script/count_counts_lines_with_lines_flag.txtar -------------------------------------------------------------------------------- /count/8/testdata/script/count_counts_words_by_default.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/8/testdata/script/count_counts_words_by_default.txtar -------------------------------------------------------------------------------- /count/8/testdata/three_lines.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 -------------------------------------------------------------------------------- /count/9/cmd/count/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/9/cmd/count/main.go -------------------------------------------------------------------------------- /count/9/count.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/9/count.go -------------------------------------------------------------------------------- /count/9/count_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/9/count_test.go -------------------------------------------------------------------------------- /count/9/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/9/go.mod -------------------------------------------------------------------------------- /count/9/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/9/go.sum -------------------------------------------------------------------------------- /count/9/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/9/test.txtar -------------------------------------------------------------------------------- /count/9/testdata/script/count_counts_bytes_with_bytes_flag.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/9/testdata/script/count_counts_bytes_with_bytes_flag.txtar -------------------------------------------------------------------------------- /count/9/testdata/script/count_counts_lines_with_lines_flag.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/9/testdata/script/count_counts_lines_with_lines_flag.txtar -------------------------------------------------------------------------------- /count/9/testdata/script/count_counts_words_by_default.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/count/9/testdata/script/count_counts_words_by_default.txtar -------------------------------------------------------------------------------- /count/9/testdata/script/count_errors_when_bytes_and_lines_flags_combined.txtar: -------------------------------------------------------------------------------- 1 | ! exec count -bytes -lines 2 | stderr 'not both' -------------------------------------------------------------------------------- /count/9/testdata/three_lines.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 -------------------------------------------------------------------------------- /findgo/1/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bitfield/findgo 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /findgo/1/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/findgo/1/main.go -------------------------------------------------------------------------------- /findgo/1/test.txtar: -------------------------------------------------------------------------------- 1 | exec go run main.go 2 | stdout '^4\n$' 3 | -------------------------------------------------------------------------------- /findgo/1/testdata/tree/file.go: -------------------------------------------------------------------------------- 1 | Some lines 2 | of code 3 | could go here 4 | -------------------------------------------------------------------------------- /findgo/1/testdata/tree/subfolder/subfolder.go: -------------------------------------------------------------------------------- 1 | Some more code 2 | here. 3 | -------------------------------------------------------------------------------- /findgo/1/testdata/tree/subfolder2/another.go: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /findgo/1/testdata/tree/subfolder2/file.go: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /findgo/2/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bitfield/findgo 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /findgo/2/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/findgo/2/main.go -------------------------------------------------------------------------------- /findgo/2/test.txtar: -------------------------------------------------------------------------------- 1 | exec go run main.go 2 | stdout '^4\n$' 3 | -------------------------------------------------------------------------------- /findgo/2/testdata/tree/file.go: -------------------------------------------------------------------------------- 1 | Some lines 2 | of code 3 | could go here 4 | -------------------------------------------------------------------------------- /findgo/2/testdata/tree/subfolder/subfolder.go: -------------------------------------------------------------------------------- 1 | Some more code 2 | here. 3 | -------------------------------------------------------------------------------- /findgo/2/testdata/tree/subfolder2/another.go: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /findgo/2/testdata/tree/subfolder2/file.go: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /findgo/3/cmd/findgo/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/findgo/3/cmd/findgo/main.go -------------------------------------------------------------------------------- /findgo/3/findgo.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/findgo/3/findgo.go -------------------------------------------------------------------------------- /findgo/3/findgo_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/findgo/3/findgo_test.go -------------------------------------------------------------------------------- /findgo/3/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/findgo/3/go.mod -------------------------------------------------------------------------------- /findgo/3/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/findgo/3/go.sum -------------------------------------------------------------------------------- /findgo/3/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/findgo/3/test.txtar -------------------------------------------------------------------------------- /findgo/3/testdata/tree/file.go: -------------------------------------------------------------------------------- 1 | Some lines 2 | of code 3 | could go here 4 | -------------------------------------------------------------------------------- /findgo/3/testdata/tree/subfolder/subfolder.go: -------------------------------------------------------------------------------- 1 | Some more code 2 | here. 3 | -------------------------------------------------------------------------------- /findgo/3/testdata/tree/subfolder2/another.go: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /findgo/3/testdata/tree/subfolder2/file.go: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /findgo/4/cmd/findgo/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/findgo/4/cmd/findgo/main.go -------------------------------------------------------------------------------- /findgo/4/findgo.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/findgo/4/findgo.go -------------------------------------------------------------------------------- /findgo/4/findgo_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/findgo/4/findgo_test.go -------------------------------------------------------------------------------- /findgo/4/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/findgo/4/go.mod -------------------------------------------------------------------------------- /findgo/4/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/findgo/4/go.sum -------------------------------------------------------------------------------- /findgo/4/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/findgo/4/test.txtar -------------------------------------------------------------------------------- /findgo/4/testdata/files.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/findgo/4/testdata/files.zip -------------------------------------------------------------------------------- /findgo/4/testdata/tree/file.go: -------------------------------------------------------------------------------- 1 | Some lines 2 | of code 3 | could go here 4 | -------------------------------------------------------------------------------- /findgo/4/testdata/tree/subfolder/subfolder.go: -------------------------------------------------------------------------------- 1 | Some more code 2 | here. 3 | -------------------------------------------------------------------------------- /findgo/4/testdata/tree/subfolder2/another.go: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /findgo/4/testdata/tree/subfolder2/file.go: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /greet/1/cmd/greet/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/greet/1/cmd/greet/main.go -------------------------------------------------------------------------------- /greet/1/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/greet/1/go.mod -------------------------------------------------------------------------------- /greet/1/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/greet/1/go.sum -------------------------------------------------------------------------------- /greet/1/greet.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/greet/1/greet.go -------------------------------------------------------------------------------- /greet/1/greet_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/greet/1/greet_test.go -------------------------------------------------------------------------------- /greet/1/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/greet/1/test.txtar -------------------------------------------------------------------------------- /greet/1/testdata/script/greet.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/greet/1/testdata/script/greet.txtar -------------------------------------------------------------------------------- /hello/1/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bitfield/hello 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /hello/1/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/hello/1/main.go -------------------------------------------------------------------------------- /hello/1/test.txtar: -------------------------------------------------------------------------------- 1 | exec go run main.go 2 | stdout 'Hello, world' 3 | ! stderr . 4 | -------------------------------------------------------------------------------- /hello/2/cmd/hello/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/hello/2/cmd/hello/main.go -------------------------------------------------------------------------------- /hello/2/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bitfield/hello 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /hello/2/hello.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/hello/2/hello.go -------------------------------------------------------------------------------- /hello/2/test.txtar: -------------------------------------------------------------------------------- 1 | exec go run ./cmd/hello/main.go 2 | stdout 'Hello, world' 3 | -------------------------------------------------------------------------------- /hello/3/cmd/hello/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/hello/3/cmd/hello/main.go -------------------------------------------------------------------------------- /hello/3/cmd/hellosrv/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/hello/3/cmd/hellosrv/main.go -------------------------------------------------------------------------------- /hello/3/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bitfield/hello 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /hello/3/hello.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/hello/3/hello.go -------------------------------------------------------------------------------- /hello/3/hello_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/hello/3/hello_test.go -------------------------------------------------------------------------------- /hello/3/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/hello/3/test.txtar -------------------------------------------------------------------------------- /hello/4/cmd/hello/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/hello/4/cmd/hello/main.go -------------------------------------------------------------------------------- /hello/4/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bitfield/hello 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /hello/4/hello.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/hello/4/hello.go -------------------------------------------------------------------------------- /hello/4/hello_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/hello/4/hello_test.go -------------------------------------------------------------------------------- /hello/4/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/hello/4/test.txtar -------------------------------------------------------------------------------- /howlong/1/cmd/howlong/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/howlong/1/cmd/howlong/main.go -------------------------------------------------------------------------------- /howlong/1/foo.txt: -------------------------------------------------------------------------------- 1 | temporary 2 | -------------------------------------------------------------------------------- /howlong/1/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bitfield/howlong 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /howlong/1/howlong.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/howlong/1/howlong.go -------------------------------------------------------------------------------- /howlong/1/howlong_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/howlong/1/howlong_test.go -------------------------------------------------------------------------------- /howlong/1/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/howlong/1/test.txtar -------------------------------------------------------------------------------- /img/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/img/cover.png -------------------------------------------------------------------------------- /kv/1/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bitfield/kv 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /kv/1/go.sum: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /kv/1/kv.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/kv/1/kv.go -------------------------------------------------------------------------------- /kv/1/kv_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/kv/1/kv_test.go -------------------------------------------------------------------------------- /kv/1/test.txtar: -------------------------------------------------------------------------------- 1 | exec go test 2 | -------------------------------------------------------------------------------- /kv/1/testdata/invalid.store: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /kv/2/cmd/kv/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/kv/2/cmd/kv/main.go -------------------------------------------------------------------------------- /kv/2/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/kv/2/go.mod -------------------------------------------------------------------------------- /kv/2/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/kv/2/go.sum -------------------------------------------------------------------------------- /kv/2/kv.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/kv/2/kv.go -------------------------------------------------------------------------------- /kv/2/kv_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/kv/2/kv_test.go -------------------------------------------------------------------------------- /kv/2/test.txtar: -------------------------------------------------------------------------------- 1 | exec go test 2 | -------------------------------------------------------------------------------- /kv/2/testdata/invalid.store: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /kv/2/testdata/script/kv_all_fails_when_store_unreadable.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/kv/2/testdata/script/kv_all_fails_when_store_unreadable.txtar -------------------------------------------------------------------------------- /kv/2/testdata/script/kv_all_lists_all_pairs.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/kv/2/testdata/script/kv_all_lists_all_pairs.txtar -------------------------------------------------------------------------------- /kv/2/testdata/script/kv_get_fails_when_store_unreadable.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/kv/2/testdata/script/kv_get_fails_when_store_unreadable.txtar -------------------------------------------------------------------------------- /kv/2/testdata/script/kv_get_fails_with_no_key.txtar: -------------------------------------------------------------------------------- 1 | ! exec kv get 2 | stderr 'Usage: kv' -------------------------------------------------------------------------------- /kv/2/testdata/script/kv_get_retrieves_single_value_from_store.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/kv/2/testdata/script/kv_get_retrieves_single_value_from_store.txtar -------------------------------------------------------------------------------- /kv/2/testdata/script/kv_get_shows_error_for_nonexistent_key.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/kv/2/testdata/script/kv_get_shows_error_for_nonexistent_key.txtar -------------------------------------------------------------------------------- /kv/2/testdata/script/kv_set_creates_store_if_necessary.txtar: -------------------------------------------------------------------------------- 1 | exec kv set foo bar 2 | exists kv.store -------------------------------------------------------------------------------- /kv/2/testdata/script/kv_set_fails_when_store_cannot_be_saved.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/kv/2/testdata/script/kv_set_fails_when_store_cannot_be_saved.txtar -------------------------------------------------------------------------------- /kv/2/testdata/script/kv_set_fails_when_store_is_invalid.txtar: -------------------------------------------------------------------------------- 1 | ! exec kv set foo bar 2 | stderr 'EOF' 3 | 4 | -- kv.store -- -------------------------------------------------------------------------------- /kv/2/testdata/script/kv_set_fails_with_no_value.txtar: -------------------------------------------------------------------------------- 1 | ! exec kv set foo 2 | stderr 'Usage: kv' -------------------------------------------------------------------------------- /kv/2/testdata/script/kv_set_updates_existing_store.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/kv/2/testdata/script/kv_set_updates_existing_store.txtar -------------------------------------------------------------------------------- /kv/2/testdata/script/kv_with_no_args_prints_usage.txtar: -------------------------------------------------------------------------------- 1 | exec kv 2 | stdout 'Usage: kv' 3 | -------------------------------------------------------------------------------- /kv/2/testdata/script/kv_with_unknown_verb_shows_usage.txtar: -------------------------------------------------------------------------------- 1 | ! exec kv bogus 2 | stderr 'Usage: kv' 3 | -------------------------------------------------------------------------------- /loc/1/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/loc/1/go.mod -------------------------------------------------------------------------------- /loc/1/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/loc/1/go.sum -------------------------------------------------------------------------------- /loc/1/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/loc/1/main.go -------------------------------------------------------------------------------- /loc/1/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/loc/1/test.txtar -------------------------------------------------------------------------------- /match/1/cmd/match/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/match/1/cmd/match/main.go -------------------------------------------------------------------------------- /match/1/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/match/1/go.mod -------------------------------------------------------------------------------- /match/1/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/match/1/go.sum -------------------------------------------------------------------------------- /match/1/match.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/match/1/match.go -------------------------------------------------------------------------------- /match/1/match_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/match/1/match_test.go -------------------------------------------------------------------------------- /match/1/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/match/1/test.txtar -------------------------------------------------------------------------------- /match/1/testdata/script/matches_lines_from_stdin.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/match/1/testdata/script/matches_lines_from_stdin.txtar -------------------------------------------------------------------------------- /older/1/cmd/older/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/older/1/cmd/older/main.go -------------------------------------------------------------------------------- /older/1/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/older/1/go.mod -------------------------------------------------------------------------------- /older/1/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/older/1/go.sum -------------------------------------------------------------------------------- /older/1/older.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/older/1/older.go -------------------------------------------------------------------------------- /older/1/older_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/older/1/older_test.go -------------------------------------------------------------------------------- /older/1/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/older/1/test.txtar -------------------------------------------------------------------------------- /pipeline/1/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/pipeline/1/go.mod -------------------------------------------------------------------------------- /pipeline/1/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/pipeline/1/go.sum -------------------------------------------------------------------------------- /pipeline/1/pipeline.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/pipeline/1/pipeline.go -------------------------------------------------------------------------------- /pipeline/1/pipeline_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/pipeline/1/pipeline_test.go -------------------------------------------------------------------------------- /pipeline/1/test.txtar: -------------------------------------------------------------------------------- 1 | exec go test 2 | -------------------------------------------------------------------------------- /pipeline/1/testdata/hello.txt: -------------------------------------------------------------------------------- 1 | Hello, world 2 | -------------------------------------------------------------------------------- /prom/1/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/prom/1/go.mod -------------------------------------------------------------------------------- /prom/1/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/prom/1/go.sum -------------------------------------------------------------------------------- /prom/1/prom.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/prom/1/prom.go -------------------------------------------------------------------------------- /prom/1/prom_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/prom/1/prom_test.go -------------------------------------------------------------------------------- /prom/1/test.txtar: -------------------------------------------------------------------------------- 1 | exec go test 2 | -------------------------------------------------------------------------------- /prom/1/testdata/config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/prom/1/testdata/config.yaml -------------------------------------------------------------------------------- /run_all_testscripts.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/run_all_testscripts.sh -------------------------------------------------------------------------------- /run_testscript.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/run_testscript.sh -------------------------------------------------------------------------------- /safewriter/1/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bitfield/safewriter 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /safewriter/1/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/safewriter/1/main.go -------------------------------------------------------------------------------- /safewriter/1/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/safewriter/1/test.txtar -------------------------------------------------------------------------------- /shell/1/cmd/shell/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/1/cmd/shell/main.go -------------------------------------------------------------------------------- /shell/1/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/1/go.mod -------------------------------------------------------------------------------- /shell/1/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/1/go.sum -------------------------------------------------------------------------------- /shell/1/shell.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/1/shell.go -------------------------------------------------------------------------------- /shell/1/shell_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/1/shell_test.go -------------------------------------------------------------------------------- /shell/1/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/1/test.txtar -------------------------------------------------------------------------------- /shell/2/cmd/shell/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/2/cmd/shell/main.go -------------------------------------------------------------------------------- /shell/2/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/2/go.mod -------------------------------------------------------------------------------- /shell/2/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/2/go.sum -------------------------------------------------------------------------------- /shell/2/shell.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/2/shell.go -------------------------------------------------------------------------------- /shell/2/shell_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/2/shell_test.go -------------------------------------------------------------------------------- /shell/2/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/2/test.txtar -------------------------------------------------------------------------------- /shell/3/cmd/shell/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/3/cmd/shell/main.go -------------------------------------------------------------------------------- /shell/3/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/3/go.mod -------------------------------------------------------------------------------- /shell/3/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/3/go.sum -------------------------------------------------------------------------------- /shell/3/shell.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/3/shell.go -------------------------------------------------------------------------------- /shell/3/shell_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/3/shell_test.go -------------------------------------------------------------------------------- /shell/3/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/3/test.txtar -------------------------------------------------------------------------------- /shell/4/cmd/shell/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/4/cmd/shell/main.go -------------------------------------------------------------------------------- /shell/4/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/4/go.mod -------------------------------------------------------------------------------- /shell/4/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/4/go.sum -------------------------------------------------------------------------------- /shell/4/shell.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/4/shell.go -------------------------------------------------------------------------------- /shell/4/shell_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/4/shell_test.go -------------------------------------------------------------------------------- /shell/4/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/4/test.txtar -------------------------------------------------------------------------------- /shell/4/testdata/script/shell_writes_transcript.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/shell/4/testdata/script/shell_writes_transcript.txtar -------------------------------------------------------------------------------- /visitors/1/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bitfield/visitors 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /visitors/1/log.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/visitors/1/log.txt -------------------------------------------------------------------------------- /visitors/1/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/visitors/1/main.go -------------------------------------------------------------------------------- /visitors/1/test.txtar: -------------------------------------------------------------------------------- 1 | exec go run main.go 2 | stdout '203.0.113.250 5' 3 | -------------------------------------------------------------------------------- /weather/1/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bitfield/weather 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /weather/1/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/1/main.go -------------------------------------------------------------------------------- /weather/1/test.txtar: -------------------------------------------------------------------------------- 1 | exec go run main.go 2 | stdout 'Invalid API key' 3 | -------------------------------------------------------------------------------- /weather/2/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/bitfield/weather 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /weather/2/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/2/main.go -------------------------------------------------------------------------------- /weather/2/test.txtar: -------------------------------------------------------------------------------- 1 | ! exec go run main.go 2 | stderr 'Please set the environment variable OPENWEATHERMAP_API_KEY' 3 | -------------------------------------------------------------------------------- /weather/3/cmd/weather/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/3/cmd/weather/main.go -------------------------------------------------------------------------------- /weather/3/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/3/go.mod -------------------------------------------------------------------------------- /weather/3/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/3/go.sum -------------------------------------------------------------------------------- /weather/3/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/3/test.txtar -------------------------------------------------------------------------------- /weather/3/testdata/weather.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/3/testdata/weather.json -------------------------------------------------------------------------------- /weather/3/testdata/weather_invalid.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/3/testdata/weather_invalid.json -------------------------------------------------------------------------------- /weather/3/weather.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/3/weather.go -------------------------------------------------------------------------------- /weather/3/weather_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/3/weather_test.go -------------------------------------------------------------------------------- /weather/4/cmd/weather/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/4/cmd/weather/main.go -------------------------------------------------------------------------------- /weather/4/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/4/go.mod -------------------------------------------------------------------------------- /weather/4/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/4/go.sum -------------------------------------------------------------------------------- /weather/4/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/4/test.txtar -------------------------------------------------------------------------------- /weather/4/testdata/weather.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/4/testdata/weather.json -------------------------------------------------------------------------------- /weather/4/testdata/weather_invalid.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/4/testdata/weather_invalid.json -------------------------------------------------------------------------------- /weather/4/weather.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/4/weather.go -------------------------------------------------------------------------------- /weather/4/weather_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/4/weather_test.go -------------------------------------------------------------------------------- /weather/5/cmd/weather/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/5/cmd/weather/main.go -------------------------------------------------------------------------------- /weather/5/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/5/go.mod -------------------------------------------------------------------------------- /weather/5/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/5/go.sum -------------------------------------------------------------------------------- /weather/5/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/5/test.txtar -------------------------------------------------------------------------------- /weather/5/testdata/weather.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/5/testdata/weather.json -------------------------------------------------------------------------------- /weather/5/testdata/weather_invalid.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/5/testdata/weather_invalid.json -------------------------------------------------------------------------------- /weather/5/weather.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/5/weather.go -------------------------------------------------------------------------------- /weather/5/weather_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/5/weather_test.go -------------------------------------------------------------------------------- /weather/6/cmd/weather/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/6/cmd/weather/main.go -------------------------------------------------------------------------------- /weather/6/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/6/go.mod -------------------------------------------------------------------------------- /weather/6/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/6/go.sum -------------------------------------------------------------------------------- /weather/6/test.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/6/test.txtar -------------------------------------------------------------------------------- /weather/6/testdata/weather.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/6/testdata/weather.json -------------------------------------------------------------------------------- /weather/6/testdata/weather_invalid.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/6/testdata/weather_invalid.json -------------------------------------------------------------------------------- /weather/6/weather.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/6/weather.go -------------------------------------------------------------------------------- /weather/6/weather_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/weather/6/weather_test.go -------------------------------------------------------------------------------- /writer/1/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/writer/1/go.mod -------------------------------------------------------------------------------- /writer/1/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/writer/1/go.sum -------------------------------------------------------------------------------- /writer/1/test.txtar: -------------------------------------------------------------------------------- 1 | exec go test 2 | -------------------------------------------------------------------------------- /writer/1/writer.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/writer/1/writer.go -------------------------------------------------------------------------------- /writer/1/writer_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/writer/1/writer_test.go -------------------------------------------------------------------------------- /writer/2/cmd/writefile/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/writer/2/cmd/writefile/main.go -------------------------------------------------------------------------------- /writer/2/go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/writer/2/go.mod -------------------------------------------------------------------------------- /writer/2/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/writer/2/go.sum -------------------------------------------------------------------------------- /writer/2/test.txtar: -------------------------------------------------------------------------------- 1 | exec go test 2 | -------------------------------------------------------------------------------- /writer/2/testdata/script/writefile.txtar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/writer/2/testdata/script/writefile.txtar -------------------------------------------------------------------------------- /writer/2/writer.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/writer/2/writer.go -------------------------------------------------------------------------------- /writer/2/writer_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitfield/tpg-tools2/HEAD/writer/2/writer_test.go --------------------------------------------------------------------------------