Skip to content

Commit 16212e0

Browse files
committed
add ToC to README.md
1 parent 67ffd46 commit 16212e0

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ From time to time I ask myself which of these ways is the fastest.
55
In Golang there is a wonderful solution, with `go test -bench` you can measure the speed very easily and quickly.
66
In order for you to benefit from it too, I will publish such benchmarks in this repository in the future.
77

8+
## ToC
9+
10+
* [base64](https://github.com/SimonWaldherr/golang-benchmarks#base64)
11+
* [between](https://github.com/SimonWaldherr/golang-benchmarks#between)
12+
* [concat](https://github.com/SimonWaldherr/golang-benchmarks#concat)
13+
* [contains](https://github.com/SimonWaldherr/golang-benchmarks#contains)
14+
* [foreach](https://github.com/SimonWaldherr/golang-benchmarks#foreach)
15+
* [hash](https://github.com/SimonWaldherr/golang-benchmarks#hash)
16+
* [index](https://github.com/SimonWaldherr/golang-benchmarks#index)
17+
* [parse](https://github.com/SimonWaldherr/golang-benchmarks#parse)
18+
* [random](https://github.com/SimonWaldherr/golang-benchmarks#random)
19+
* [regexp](https://github.com/SimonWaldherr/golang-benchmarks#regexp)
20+
821
## Golang?
922

1023
I published another repository where I show some Golang examples.

updateBenchLogs.sh

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
declare -a benchs=(base64 between concat contains foreach hash index parse random regexp)
4+
35
cat > README.md <<- EOM
46
# Go Benchmarks
57
@@ -8,6 +10,17 @@ From time to time I ask myself which of these ways is the fastest.
810
In Golang there is a wonderful solution, with \`go test -bench\` you can measure the speed very easily and quickly.
911
In order for you to benefit from it too, I will publish such benchmarks in this repository in the future.
1012
13+
## ToC
14+
15+
EOM
16+
17+
for i in "${benchs[@]}"
18+
do
19+
echo "* [$i](https://github.com/SimonWaldherr/golang-benchmarks#$i)" >> README.md
20+
done
21+
22+
cat >> README.md <<- EOM
23+
1124
## Golang?
1225
1326
I published another repository where I show some Golang examples.
@@ -29,7 +42,7 @@ EOM
2942

3043
go fmt ./...
3144

32-
declare -a benchs=(base64 between concat contains foreach hash index parse random regexp)
45+
3346

3447
for i in "${benchs[@]}"
3548
do

0 commit comments

Comments
 (0)