Skip to main content

go/README.md

1# go
3These scripts are for working with Go.
5## The individual scripts
7<!-- [[[cog
9# This adds the root of the repo to the PATH, which has cog_helpers.py
10from os.path import abspath, dirname
11import sys
13sys.path.append(abspath(dirname(dirname("."))))
15import cog_helpers
17folder_name = "go"
19scripts = [
20 {
21 "usage": "gobench PACKAGE -bench=$BENCHMARK_NAME",
22 "description": "compare benchmark results between a local branch and main",
23 },
24 {
25 "usage": "gocover PACKAGE",
26 "description": "run tests and report test coverage for the package"
27 },
28 {
29 "usage": "gostress PACKAGE TEST_NAME",
30 "description": "run a test with Go’s stress utility",
31 },
34cog_helpers.create_description_table(folder_name=folder_name, scripts=scripts)
36]]]-->
37<dl>
38 <dt>
39 <a href="https://github.com/alexwlchan/scripts/blob/main/go/gobench">
40 <code>gobench PACKAGE -bench=$BENCHMARK_NAME</code>
41 </a>
42 </dt>
43 <dd>
44 compare benchmark results between a local branch and main
45 </dd>
47 <dt>
48 <a href="https://github.com/alexwlchan/scripts/blob/main/go/gocover">
49 <code>gocover PACKAGE</code>
50 </a>
51 </dt>
52 <dd>
53 run tests and report test coverage for the package
54 </dd>
56 <dt>
57 <a href="https://github.com/alexwlchan/scripts/blob/main/go/gostress">
58 <code>gostress PACKAGE TEST_NAME</code>
59 </a>
60 </dt>
61 <dd>
62 run a test with Go’s stress utility
63 </dd>
64</dl>
65<!-- [[[end]]] (sum: eCNO30UwC4) -->