Skip to content

Commit

Permalink
update readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
kjk committed Jul 9, 2017
1 parent c14d849 commit d097a94
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 21 deletions.
13 changes: 7 additions & 6 deletions 3-ways-to-iterate/readme.md
@@ -1,9 +1,10 @@
Code samples for <a href="https://blog.kowalczyk.info/book/go-cookbook.html">Go Cookbook</a> chapter on
<a href="">3 ways to iterate</a>.
Code samples from [Go Cookbook](https://blog.kowalczyk.info/book/go-cookbook.html).

Chapter: [3 ways to iterate](https://blog.kowalczyk.info/article/1Bkr/3-ways-to-iterate-in-go.html).

Legend:

* <a href="inlined.go">inlined.go</a> : iteration and processing commingled
* <a href="callback.go">callback.go</a> : iteration code calls a processing callback for each item
* <a href="channel.go">channel.go</a> : iterator sends item over a channel
* <a href="next.go">next.go</a> : iterator is a struct that implements `Next` method to advance to the next item
* [inlined.go](inlined.go) : iteration and processing commingled
* [callback.go](callback.go) : iteration code calls a processing callback for each item
* [channel.go](channel.go) : iterator sends item over a channel
* [next.go](next.go) : iterator is a struct that implements `Next` method to advance to the next item
9 changes: 7 additions & 2 deletions README.md
@@ -1,9 +1,14 @@
Code for my [Go Cookbok](https://blog.kowalczyk.info/book/go-cookbook.html) articles.

All code samples are [public domain](https://en.wikipedia.org/wiki/Public_domain).
You can use them any way you want, without attribution.

Legend:
* [Advanced command execution in Go with os/exec](https://blog.kowalczyk.info/article/wOYk/advanced-command-execution-in-go-with-osexec.html), code: [advanced-exec](/advanced-exec)
* [Generating good, random and unique ids in Go](https://blog.kowalczyk.info/article/JyRZ/generating-good-random-and-unique-ids-in-go.html), code: [generate-unique-id](/generate-unique-id)
* [HTTPS for free in Go](https://blog.kowalczyk.info/article/Jl3G/https-for-free-in-go.html), code: [free-ssl-certificates](/free-ssl-certificates)

All code samples are [public domain](https://en.wikipedia.org/wiki/Public_domain).
You can use them any way you want, without attribution.
Drafts:
* [3 ways to iterate](https://blog.kowalczyk.info/article/1Bkr/3-ways-to-iterate-in-go.html)
* [Embedding build number in Go executable](https://blog.kowalczyk.info/article/vEja/embedding-build-number-in-go-executable.html)
* [Using MySQL in Docker for local testing In Go](https://blog.kowalczyk.info/article/w4re/using-mysql-in-docker-for-local-testing-in-go.html)
15 changes: 13 additions & 2 deletions advanced-exec/readme.md
@@ -1,2 +1,13 @@
Code samples for <a href="https://blog.kowalczyk.info/book/go-cookbook.html">Go Cookbook</a> chapter on
<a href="https://blog.kowalczyk.info/article/wOYk/advanced-command-execution-in-go-with-osexec.html">advanced command execution with os/exec</a>.
Code samples from [Go Cookbook](https://blog.kowalczyk.info/book/go-cookbook.html).

Chapter: [advanced command execution with os/exec](https://blog.kowalczyk.info/article/wOYk/advanced-command-execution-in-go-with-osexec.html).

Legend:
* [01-simple-exec.go](01-simple-exec.go) : execute the command
* [02-capture-stdout-stderr.go](02-capture-stdout-stderr) : execute and capture stdout and stderr
* [03-live-progress-and-capture-v1.go](03-live-progress-and-capture-v1.go) : execute, capture output, show output during execution, version 1
* [03-live-progress-and-capture-v2.go](03-live-progress-and-capture-v2.go) : execute, capture output, show output during execution, version 2
* [03-live-progress-and-capture-v3.go](03-live-progress-and-capture-v3.go) : execute, capture output, show output during execution, version 3
* [04-check-exe-exists.go](04-check-exe-exists.go) : verify executable exists before trying to run it
* [05-change-environment.go](05-change-environment.go) : change environment variables of the process
* [06-feed-stdin.go](06-feed-stdin.go) :
10 changes: 8 additions & 2 deletions embed-build-number/readme.md
@@ -1,2 +1,8 @@
Code samples for <a href="https://blog.kowalczyk.info/book/go-cookbook.html">Go Cookbook</a>
chapter on <a href="">embedding build number in Go executable</a>.
Code samples from [Go Cookbook](https://blog.kowalczyk.info/book/go-cookbook.html).

Chapter: [embedding build number in Go executable](https://blog.kowalczyk.info/article/vEja/embedding-build-number-in-go-executable.html).

Legend:
* [main.go](main.go) : test program
* [build.sh](build.sh) : mac/unix build script
* [build.ps1](build.ps1) : windows build script
8 changes: 6 additions & 2 deletions free-ssl-certificates/readme.md
@@ -1,2 +1,6 @@
Code samples for <a href="https://blog.kowalczyk.info/book/go-cookbook.html">Go Cookbook</a>
chapter on <a href="https://blog.kowalczyk.info/article/Jl3G/https-for-free-in-go.html">HTTPS for free, with little help of Let's Encrypt</a>.
Code samples from [Go Cookbook](https://blog.kowalczyk.info/book/go-cookbook.html).

Chapter: [HTTPS for free in Go, with little help of Let's Encrypt](https://blog.kowalczyk.info/article/Jl3G/https-for-free-in-go.html).

Legend:
* [main.go](main.go) : simple web server showing how to serve HTTPS using free Let's Encrpt certificate and how to redirect from HTTP to HTTPS
10 changes: 8 additions & 2 deletions generate-unique-id/readme.md
@@ -1,2 +1,8 @@
Code samples for <a href="https://blog.kowalczyk.info/book/go-cookbook.html">Go Cookbook</a>
chapter on <a href="https://blog.kowalczyk.info/article/JyRZ/generating-good-random-and-unique-ids-in-go.html">generating good unique ids</a>. A survey of 7 libraries.
Code samples from [Go Cookbook](https://blog.kowalczyk.info/book/go-cookbook.html).

Chapter: [generating good unique ids](https://blog.kowalczyk.info/article/JyRZ/generating-good-random-and-unique-ids-in-go.html)

Legend:
* [main.go](main.go) : test program that shows unique id generated with 7 different libraries

You might need to `go get -u ./...` to install the libraries.
3 changes: 1 addition & 2 deletions http-bundle-assets/readme.md
@@ -1,2 +1 @@
Code samples for chapter on <a href="">embedding HTTP assets in Go Executable</a>
from <a href="https://blog.kowalczyk.info/book/go-cookbook.html">Go Cookbook</a>.
Code samples from [Go Cookbook](https://blog.kowalczyk.info/book/go-cookbook.html).
10 changes: 7 additions & 3 deletions start-mysql-in-docker-go/readme.md
@@ -1,4 +1,8 @@
Code samples for chapter on <a href="">Using MySQL in Docker for local testing</a>
from <a href="https://blog.kowalczyk.info/book/go-cookbook.html">Go Cookbook</a>.
Code samples from [Go Cookbook](https://blog.kowalczyk.info/book/go-cookbook.html).

You must have <a href="https://www.docker.com/">docker</a> installed.
Chapter: [Using MySQL in Docker for local testing In Go](https://blog.kowalczyk.info/article/w4re/using-mysql-in-docker-for-local-testing-in-go.html).

You must have [docker](https://www.docker.com) installed.

Legend:
* [main.go](main.go) : shows how to programmatically start MySQL running inside a Docker container and obtain ip address to connect to

0 comments on commit d097a94

Please sign in to comment.