@srobroek/pi-lang-go 0.0.0-stage → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +102 -0
- package/LICENSE +202 -0
- package/README.md +49 -2
- package/package.json +27 -4
- package/skills/lang-go/SKILL.md +21 -0
- package/skills/lang-go-libraries/SKILL.md +75 -0
- package/skills/lang-go-libraries/references/ai.md +29 -0
- package/skills/lang-go-libraries/references/aws.md +76 -0
- package/skills/lang-go-libraries/references/cli.md +29 -0
- package/skills/lang-go-libraries/references/data.md +46 -0
- package/skills/lang-go-libraries/references/messaging.md +35 -0
- package/skills/lang-go-libraries/references/observability.md +40 -0
- package/skills/lang-go-libraries/references/quality.md +66 -0
- package/skills/lang-go-libraries/references/runtime.md +51 -0
- package/skills/lang-go-libraries/references/security.md +40 -0
- package/skills/lang-go-libraries/references/services.md +53 -0
- package/skills/lang-go-libraries/references/testing.md +73 -0
- package/skills/lang-go-packaging/SKILL.md +118 -0
- package/skills/lang-go-profiling/SKILL.md +63 -0
- package/skills/lang-go-quality/SKILL.md +75 -0
- package/skills/lang-go-testing/SKILL.md +140 -0
- package/skills/lang-go-testing/references/practice.md +293 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
## lang-go [0.9.3](https://github.com/srobroek/harness-plugins/compare/lang-go--v0.9.2...lang-go--v0.9.3) (2026-11-24)
|
|
2
|
+
|
|
3
|
+
## lang-go [0.9.2](https://github.com/srobroek/harness-plugins/compare/lang-go--v0.9.1...lang-go--v0.9.2) (2026-11-24)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* **tools:** restore portable MCP defaults ([f4c4930](https://github.com/srobroek/harness-plugins/commit/f4c4930b68477b6c050cc3e0a6ed62b6b8f8d402))
|
|
8
|
+
|
|
9
|
+
## lang-go [0.9.1](https://github.com/srobroek/harness-plugins/compare/lang-go--v0.9.0...lang-go--v0.9.1) (2026-11-23)
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **whats-new:** grant MCP tools to the whats-new research agent ([8ae7fe0](https://github.com/srobroek/harness-plugins/commit/8ae7fe05c65e2df2f53ebf944c8f9bd5b7625cf9))
|
|
14
|
+
|
|
15
|
+
## lang-go [0.9.0](https://github.com/srobroek/harness-plugins/compare/lang-go--v0.8.1...lang-go--v0.9.0) (2026-11-23)
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **project:** port content plugins to Pi ([5b0d32a](https://github.com/srobroek/harness-plugins/commit/5b0d32abbe2faf67934ca1d8e3b53f9eca0cee01))
|
|
20
|
+
|
|
21
|
+
## lang-go [0.8.1](https://github.com/srobroek/harness-plugins/compare/lang-go--v0.8.0...lang-go--v0.8.1) (2026-11-23)
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* make every plugin agent's OMP form correct ([96b7bfe](https://github.com/srobroek/harness-plugins/commit/96b7bfea3c35017b34a28f59e81fb059f6c68a24))
|
|
26
|
+
|
|
27
|
+
## lang-go [0.8.0](https://github.com/srobroek/harness-plugins/compare/lang-go--v0.7.0...lang-go--v0.8.0) (2026-11-23)
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* ship seven skills plugins to OMP ([6658a5f](https://github.com/srobroek/harness-plugins/commit/6658a5fe470ab0f1eea0e41803af29b98e7e3a27))
|
|
32
|
+
|
|
33
|
+
## lang-go [0.7.0](https://github.com/srobroek/harness-plugins/compare/lang-go--v0.6.1...lang-go--v0.7.0) (2026-11-22)
|
|
34
|
+
|
|
35
|
+
### Features
|
|
36
|
+
|
|
37
|
+
* **delivery:** ship the orchestrator agent ([#121](https://github.com/srobroek/harness-plugins/issues/121)) ([53f33c0](https://github.com/srobroek/harness-plugins/commit/53f33c016315732220a7c87066267931ee87f514))
|
|
38
|
+
|
|
39
|
+
## lang-go [0.6.1](https://github.com/srobroek/harness-plugins/compare/lang-go--v0.6.0...lang-go--v0.6.1) (2026-11-21)
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
* **code-challenge:** close dogfood friction in skill, schema and validation ([043a8b3](https://github.com/srobroek/harness-plugins/commit/043a8b39057ec8fca54d09adebb0532c2154e330))
|
|
44
|
+
|
|
45
|
+
# Changelog
|
|
46
|
+
|
|
47
|
+
## [0.6.0](https://github.com/srobroek/opencode-plugins/compare/lang-go--v0.5.0...lang-go--v0.6.0) (2026-11-20)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Features
|
|
51
|
+
|
|
52
|
+
* plugin scan fixes, wider agent access and the plugin-audit plugin ([9c71525](https://github.com/srobroek/opencode-plugins/commit/9c7152559776aaf80cfed9626d78bafdd845fa9a))
|
|
53
|
+
* **plugin-audit:** add plugin_audit_scan tool and plugin-audit skill ([d400433](https://github.com/srobroek/opencode-plugins/commit/d4004330e9a922d8e832b6f3266502141eaea4a3))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Refactors
|
|
57
|
+
|
|
58
|
+
* **lib:** one MCP tool grant table for the tools option ([f8cc1d8](https://github.com/srobroek/opencode-plugins/commit/f8cc1d817d62b211b712d1889200f7c91f049c89))
|
|
59
|
+
|
|
60
|
+
## [0.5.0](https://github.com/srobroek/opencode-plugins/compare/lang-go--v0.4.0...lang-go--v0.5.0) (2026-11-19)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Features
|
|
64
|
+
|
|
65
|
+
* **modes:** debug, refactor and concept agents ([6369b8a](https://github.com/srobroek/opencode-plugins/commit/6369b8ae6c4ca35c664f094b60c28d356cc13298))
|
|
66
|
+
* **safety:** secret_store tool stores a generated or command-issued secret without a shell ([d84a1d2](https://github.com/srobroek/opencode-plugins/commit/d84a1d22b0ff6e72f327fb185c512b2296a80a1e))
|
|
67
|
+
* **toolchain:** prescriptive testing and quality concerns for every language ([2cbcb66](https://github.com/srobroek/opencode-plugins/commit/2cbcb66c2e4589eccf2553d324d83680744cd6d7))
|
|
68
|
+
|
|
69
|
+
## [0.4.0](https://github.com/srobroek/opencode-plugins/compare/lang-go--v0.3.0...lang-go--v0.4.0) (2026-11-13)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Features
|
|
73
|
+
|
|
74
|
+
* **agents:** a tools option that lets read-only and coding agents call allowed MCP tools ([70558c3](https://github.com/srobroek/opencode-plugins/commit/70558c30dc450faec7e6012cdb0f678f1ecd7f01))
|
|
75
|
+
|
|
76
|
+
## [0.3.0](https://github.com/srobroek/opencode-plugins/compare/lang-go--v0.2.0...lang-go--v0.3.0) (2026-11-12)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### Features
|
|
80
|
+
|
|
81
|
+
* **quality:** OpenFeature flags with a flags.yaml, SSM or AppConfig provider; code and storage guidance ([20baffa](https://github.com/srobroek/opencode-plugins/commit/20baffae842836d814f1f5c3e2cd410c5bde0dd4))
|
|
82
|
+
* **quality:** research-first engineering standards and per-language library standards for every coding agent ([09e8d46](https://github.com/srobroek/opencode-plugins/commit/09e8d461bb2b7654788a588ef6932929ff564d28))
|
|
83
|
+
* **quality:** testing standards: behavior tests, test budget, same-change maintenance, reviewers check test changes ([dcdf941](https://github.com/srobroek/opencode-plugins/commit/dcdf9413b6793ed06ef8978a0084d9f50d30b00c))
|
|
84
|
+
|
|
85
|
+
## [0.2.0](https://github.com/srobroek/opencode-plugins/compare/lang-go--v0.1.0...lang-go--v0.2.0) (2026-10-27)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
### Features
|
|
89
|
+
|
|
90
|
+
* **lang-go:** add testing and packaging skills and deepen the quality checks ([32cb1ff](https://github.com/srobroek/opencode-plugins/commit/32cb1ff1c2536d89f1230616fe743ded21907983))
|
|
91
|
+
* **lang-go:** lang-go plugin with lang-go router, quality and profiling skills ([4eda893](https://github.com/srobroek/opencode-plugins/commit/4eda893febb38cab2cd816bf669330bb405eeaa2))
|
|
92
|
+
* **lang-go:** vet and build once after multi-file or signature edits ([70fa30e](https://github.com/srobroek/opencode-plugins/commit/70fa30e220b3f98c8d997b280a1500d3e290d953))
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
### Bug Fixes
|
|
96
|
+
|
|
97
|
+
* **lib:** keep a shipped agent hidden when the host prefills hidden: false ([6156c94](https://github.com/srobroek/opencode-plugins/commit/6156c946f8a5265ff5498bb4062a9d822bbd0555))
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Documentation
|
|
101
|
+
|
|
102
|
+
* add repomix to the manual-test install loop ([d411160](https://github.com/srobroek/opencode-plugins/commit/d41116016e8a7f7390046cc8aca70f58b7c2ab22))
|
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,50 @@
|
|
|
1
|
-
#
|
|
1
|
+
# lang-go
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Go skills: the build, lint, test, tidy and vulnerability checks to run through the shell
|
|
4
|
+
tool and in CI, how to report a step that could not run, testing and fuzzing idioms,
|
|
5
|
+
module and package layout, and the profiler and benchmark tooling.
|
|
6
|
+
Formatting is OpenCode's built-in formatter (`"formatter": true`); see
|
|
7
|
+
[docs/formatters.md](../../docs/formatters.md).
|
|
8
|
+
|
|
9
|
+
Replaces the Go half of the former `languages` plugin, which ported the omp-plugins `go`
|
|
10
|
+
plugin (its `go_quality` tool is not ported).
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
Install the Pi package from npm:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
pi install npm:@srobroek/pi-lang-go
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
opencode plugin add 'github:srobroek/harness-plugins::path:plugins/lang-go/opencode'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Claude Code install the same skills from this repository's marketplace:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
claude plugin install lang-go@harness-plugins
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Skills
|
|
30
|
+
|
|
31
|
+
Only `lang-go` is listed to the model in OpenCode: it is a router whose body maps each
|
|
32
|
+
situation to the skills below, which set `opencode/autoinvoke: false` and load by id. One listing
|
|
33
|
+
entry instead of one per skill keeps the per-request skills listing short. Claude Code ignores that metadata, so there every skill is listed and triggers directly.
|
|
34
|
+
The profiling skill is also reached through the `quality` plugin's `quality-profiling` skill.
|
|
35
|
+
|
|
36
|
+
The plugin registers these skills from `skills/`, unless a skill with the same id
|
|
37
|
+
already exists:
|
|
38
|
+
|
|
39
|
+
- `lang-go`: the router.
|
|
40
|
+
- `lang-go-libraries`: compare standard-library defaults and conditional alternatives
|
|
41
|
+
before writing web, data, messaging, AWS, AI, telemetry, CLI, testing or security code.
|
|
42
|
+
- `lang-go-quality`: `go build`, `golangci-lint fmt --diff` or `gofmt -l`, `golangci-lint run`
|
|
43
|
+
or `go vet`, `go test -race`, `go mod tidy -diff`, `govulncheck`, in that order, and CI.
|
|
44
|
+
- `lang-go-testing`: table tests and subtests, go-cmp, golden files, fuzzing, httptest,
|
|
45
|
+
`testing/synctest`; `references/practice.md` has tool choices, bad tests with fixes,
|
|
46
|
+
and defaults by use case.
|
|
47
|
+
- `lang-go-packaging`: one module with `cmd/` and `internal/`, `go.work`, `tool`
|
|
48
|
+
directives, build tags for debug code, depguard import rules.
|
|
49
|
+
- `lang-go-profiling`: pprof, `go test -bench`, `go tool trace`, benchstat. The method is
|
|
50
|
+
the `quality` plugin's `quality-profiling` skill.
|
package/package.json
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@srobroek/pi-lang-go",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.9.3",
|
|
4
|
+
"description": "Go skills: build, lint, go test -race, tidy and govulncheck checks, testing and fuzzing, module and package layout, and pprof profiling.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pi-package"
|
|
7
|
+
],
|
|
8
|
+
"license": "Apache-2.0",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/srobroek/harness-plugins.git",
|
|
12
|
+
"directory": "plugins/lang-go/pi"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"CHANGELOG.md",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"README.md",
|
|
18
|
+
"skills"
|
|
19
|
+
],
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public",
|
|
22
|
+
"provenance": true
|
|
23
|
+
},
|
|
24
|
+
"pi": {
|
|
25
|
+
"skills": [
|
|
26
|
+
"./skills"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lang-go
|
|
3
|
+
description: "Use for Go work: go test, fuzzing, golangci-lint, govulncheck, modules, internal/, go.work, pprof or benchmarks."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Go
|
|
7
|
+
|
|
8
|
+
This guide only routes. Before you answer or act, load the matching skill with the skill
|
|
9
|
+
tool, by id, in this same turn, and every other row the task spans. Answer from the loaded
|
|
10
|
+
skill, not from this table.
|
|
11
|
+
|
|
12
|
+
| Situation | Load skill |
|
|
13
|
+
| --- | --- |
|
|
14
|
+
| Choosing a library or tool, or about to write your own code for a common concern (web, data, messaging, AWS, MCP, telemetry, CLI, testing, security) | `lang-go-libraries` |
|
|
15
|
+
| Running Go build, format, lint, vet, `go mod tidy`, govulncheck and test checks, locally or in CI | `lang-go-quality` |
|
|
16
|
+
| Writing or fixing Go tests: table tests, subtests, `-race`, golden files, fuzzing, httptest, synctest | `lang-go-testing` |
|
|
17
|
+
| Go module and package layout: monorepos, `cmd/`, `internal/`, `go.work`, build tags, depguard import rules | `lang-go-packaging` |
|
|
18
|
+
| Go profilers and benchmarks: pprof, `go test -bench`, benchstat | `lang-go-profiling` |
|
|
19
|
+
|
|
20
|
+
Go design (interfaces, errors, package responsibilities) is the `quality-code-design`
|
|
21
|
+
skill's `go.md` reference.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lang-go-libraries
|
|
3
|
+
description: Compare Go libraries before writing code for web, data, AWS, messaging, telemetry, CLI, testing or security.
|
|
4
|
+
metadata:
|
|
5
|
+
opencode/autoinvoke: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Go libraries
|
|
9
|
+
|
|
10
|
+
Checked 2026-11-16.
|
|
11
|
+
|
|
12
|
+
## How to use
|
|
13
|
+
|
|
14
|
+
- Keep the project's existing choice unless the task is a migration. Apply the reuse order: existing code, standard library, framework features, listed dependency.
|
|
15
|
+
- Otherwise use the default below. An alternative needs its listed condition. A departure from both needs a named gap; report the choice and reason.
|
|
16
|
+
- Read the relevant reference before designing or writing code. The defaults are recommendations with conditions for alternatives.
|
|
17
|
+
- Re-check fast-moving rows, especially MCP, LLM SDKs and OpenTelemetry, on the registry before adding them. Use the latest release; these tables name major or minor lines, and the lockfile pins what resolves.
|
|
18
|
+
- A dependency the request did not name needs approval, even when this guide lists it. Do not add unused parts of this stack.
|
|
19
|
+
- Use `toolchain-api` for API style, contracts and API test tools. Use `quality-code-design` and its `middleware.md` and `telemetry.md` references for shared design rules.
|
|
20
|
+
- Use `lang-go-quality` and `lang-go-testing` for commands. Use `aws-guidance` for Lambda and AWS deployment decisions.
|
|
21
|
+
|
|
22
|
+
## Default stack
|
|
23
|
+
|
|
24
|
+
Standard-library entries below use Go `1.27`; retain a supported lower minimum when the project requires it.
|
|
25
|
+
|
|
26
|
+
| Concern | Default | Notes |
|
|
27
|
+
| --- | --- | --- |
|
|
28
|
+
| Runtime | Go `1.27` | `1.26` remains a supported compatibility line. |
|
|
29
|
+
| HTTP server and router | `net/http`, `http.ServeMux` | Standard library is sufficient for ordinary method/path routing. |
|
|
30
|
+
| Middleware | `func(http.Handler) http.Handler` | Use framework middleware for cross-cutting concerns, not repeated handler code. |
|
|
31
|
+
| Request validation | Explicit domain checks; `github.com/go-playground/validator/v10` `>= 10` for tags | Standard library suffices for small boundary types. |
|
|
32
|
+
| OpenAPI | `github.com/oapi-codegen/oapi-codegen/v2` `>= 2` | Schema-first; `github.com/danielgtaylor/huma/v2` `>= 2` for code-first. |
|
|
33
|
+
| RPC | `connectrpc.com/connect/v2` `>= 2` | `google.golang.org/grpc` `>= 1` for established gRPC infrastructure. |
|
|
34
|
+
| GraphQL | `github.com/99designs/gqlgen` `>= 0.17` | Only when graph-shaped client needs justify it. |
|
|
35
|
+
| Streaming | `net/http` SSE | Standard library suffices for one-way notifications. |
|
|
36
|
+
| JSON | `encoding/json` | Preserve existing wire semantics; JSON v2 is available in Go `1.27`. |
|
|
37
|
+
| PostgreSQL | `github.com/jackc/pgx/v5` `>= 5` | Its pool plus generated SQL. |
|
|
38
|
+
| SQL generation | `github.com/sqlc-dev/sqlc` `>= 1` | Keep SQL explicit. |
|
|
39
|
+
| Migrations | `github.com/pressly/goose/v3` `>= 3` | SQL migrations; do not migrate on every request. |
|
|
40
|
+
| Valkey | `github.com/valkey-io/valkey-go` `>= 1` | Redis integrations may retain `github.com/redis/go-redis/v9` `>= 9`. |
|
|
41
|
+
| Local cache | `sync.Map` or locked map | Standard library suffices when eviction is unnecessary. |
|
|
42
|
+
| Background jobs | `github.com/riverqueue/river` `>= 0.51` | PostgreSQL-backed durable jobs. |
|
|
43
|
+
| Workflows | `go.temporal.io/sdk` `>= 1` | Only for durable orchestration. |
|
|
44
|
+
| Kafka | `github.com/twmb/franz-go` `>= 1` | Pure-Go client; AWS IAM signer for MSK. |
|
|
45
|
+
| Logging | `log/slog` JSON handler | Standard library suffices; enrich from request context. |
|
|
46
|
+
| Telemetry | `go.opentelemetry.io/otel` `>= 1` over OTLP | Explicit SDK bootstrap and bounded shutdown. |
|
|
47
|
+
| HTTP instrumentation | `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` `>= 0.72` | Instrument server and shared client transport. |
|
|
48
|
+
| HTTP client | `net/http.Client` | Standard library suffices with shared transport and time budgets. |
|
|
49
|
+
| AWS | `github.com/aws/aws-sdk-go-v2` `>= 1` | SDK product generation is v2; root module major is `1`. |
|
|
50
|
+
| Lambda | `github.com/aws/aws-lambda-go` `>= 1` | Thin adapters; no official Go Powertools. |
|
|
51
|
+
| MCP | `github.com/modelcontextprotocol/go-sdk` `>= 1` | Official SDK; verify protocol compatibility. |
|
|
52
|
+
| LLM calls | Provider SDK | `github.com/openai/openai-go/v3` `>= 3` or `github.com/anthropics/anthropic-sdk-go/v2` `>= 2`. |
|
|
53
|
+
| CLI | `flag` | Standard library suffices for small tools; `github.com/spf13/cobra` `>= 1` for command trees. |
|
|
54
|
+
| Configuration | `os.LookupEnv`, typed structs | Standard library suffices for a few values; `github.com/knadh/koanf/v2` `>= 2` for layered sources. |
|
|
55
|
+
| Tests | `testing`, `net/http/httptest`, `testing/synctest` | Standard library covers unit, HTTP, concurrency, fuzzing and benchmarks. |
|
|
56
|
+
| Database integration tests | `github.com/testcontainers/testcontainers-go` `>= 0.45` | Test actual database behavior. |
|
|
57
|
+
| Dependency security | `golang.org/x/vuln/cmd/govulncheck` `>= 1` | Reachability-aware; complement with artifact SCA. |
|
|
58
|
+
| Concurrency | `context`, channels, `sync`; `golang.org/x/sync/errgroup` `>= 0.25` | Standard library first; bounded groups when cancellation is needed. |
|
|
59
|
+
| Errors and IDs | `errors`, `fmt`, `uuid` | Standard library suffices for error chains and UUID v4/v7 in Go `1.27`. |
|
|
60
|
+
|
|
61
|
+
## References
|
|
62
|
+
|
|
63
|
+
| File | Covers |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| [services.md](references/services.md) | HTTP and content boundaries. |
|
|
66
|
+
| [data.md](references/data.md) | Codecs and persistence. |
|
|
67
|
+
| [messaging.md](references/messaging.md) | Durable work and broker clients. |
|
|
68
|
+
| [observability.md](references/observability.md) | Logs and OpenTelemetry. |
|
|
69
|
+
| [aws.md](references/aws.md) | Lambda and AWS service clients. |
|
|
70
|
+
| [ai.md](references/ai.md) | MCP and model integrations. |
|
|
71
|
+
| [cli.md](references/cli.md) | Commands and terminal interaction. |
|
|
72
|
+
| [testing.md](references/testing.md) | Behavioral and performance testing. |
|
|
73
|
+
| [quality.md](references/quality.md) | Lint, analysis, audit, API-break and docs tools. |
|
|
74
|
+
| [security.md](references/security.md) | Security controls and scanners. |
|
|
75
|
+
| [runtime.md](references/runtime.md) | Build and application lifecycle. |
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Go AI integrations
|
|
2
|
+
|
|
3
|
+
Prefer official protocol/provider SDKs and add orchestration only for a concrete workflow requirement.
|
|
4
|
+
|
|
5
|
+
Checked 2026-11-12.
|
|
6
|
+
|
|
7
|
+
| Concern | Default | Use instead when | Avoid (why) |
|
|
8
|
+
| --- | --- | --- | --- |
|
|
9
|
+
| MCP | `github.com/modelcontextprotocol/go-sdk` `>= 1` | `github.com/mark3labs/mcp-go` `>= 1` for existing integrations or specific API preferences | Bespoke JSON-RPC presented as complete MCP. |
|
|
10
|
+
| MCP compatibility | Official SDK `>= 1.8` supports spec `2026-07-28`; SDK `1.7+` also lists older revisions | Pinned older peer protocol for compatibility | New designs relying on roots/sampling/logging deprecated in `2026-07-28`; client OAuth is experimental. |
|
|
11
|
+
| MCP transports | Official SDK `>= 1` stdio for local tools; Streamable HTTP for remote services | Compatibility transport only when required by peers | Legacy HTTP+SSE as the new default; stdout logs corrupting stdio; unvalidated origins/auth on HTTP. |
|
|
12
|
+
| OpenAI | `github.com/openai/openai-go/v3` `>= 3` | Existing framework integration for proven provider portability | Handwritten HTTP envelopes or retries where SDK features suffice. |
|
|
13
|
+
| Anthropic | `github.com/anthropics/anthropic-sdk-go/v2` `>= 2` | Existing compatible SDK during a planned migration | Unsuffixed major `1` imports mistaken for current major `2`. |
|
|
14
|
+
| Bedrock | AWS SDK v2 `service/bedrockruntime` `>= 1` Converse | Application tool loop for demonstrated workflow needs | Inventing official Go Strands bindings. |
|
|
15
|
+
| Orchestration | Direct SDK and explicit application workflow | `github.com/firebase/genkit/go` `>= 1` for its flow ecosystem; `github.com/cloudwego/eino` `>= 0.9` for graph orchestration; `github.com/tmc/langchaingo` `>= 0.1` for existing integrations | Broad frameworks for one call; assuming every framework is stable major `1`. |
|
|
16
|
+
| GenAI telemetry | OTel `>= 1` spans around model/tool boundaries, duration, tokens and failures | Provider/framework instrumentation with reviewed coverage and privacy | Prompts/completions recorded by default; assuming development GenAI/MCP conventions are stable. |
|
|
17
|
+
|
|
18
|
+
## Rules
|
|
19
|
+
|
|
20
|
+
- Re-check registry, protocol matrix and transport/auth behavior before adding or upgrading. Pin versions and test peer interoperability.
|
|
21
|
+
- Treat tool arguments and results as untrusted boundary data. Authorize each operation; apply execution deadlines, concurrency and output-size limits.
|
|
22
|
+
- Keep prompts and completions out of logs/traces unless explicitly approved. Pin conventions separately from SDKs and avoid double instrumentation.
|
|
23
|
+
- Use `toolchain-api` for API/protocol choice and `observability.md` for the OTel lifecycle.
|
|
24
|
+
|
|
25
|
+
## Sources
|
|
26
|
+
|
|
27
|
+
- [Official Go SDK compatibility](https://github.com/modelcontextprotocol/go-sdk#version-compatibility), [SDK registry](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk), [mcp-go](https://pkg.go.dev/github.com/mark3labs/mcp-go), [MCP transports](https://modelcontextprotocol.io/specification/latest/basic/transports).
|
|
28
|
+
- [OpenAI](https://pkg.go.dev/github.com/openai/openai-go/v3), [Anthropic](https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go/v2), [Genkit](https://pkg.go.dev/github.com/firebase/genkit/go), [Eino](https://pkg.go.dev/github.com/cloudwego/eino), [LangChainGo](https://pkg.go.dev/github.com/tmc/langchaingo).
|
|
29
|
+
- [Bedrock Converse](https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference-call.html), [GenAI conventions](https://github.com/open-telemetry/semantic-conventions-genai/blob/main/docs/gen-ai/client-inference.md), [MCP conventions](https://github.com/open-telemetry/semantic-conventions-genai/blob/main/docs/gen-ai/mcp.md).
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Go AWS and Lambda
|
|
2
|
+
|
|
3
|
+
Use official SDK helpers unless a maintained library removes markedly more work (see `aws-guidance`'s `service-clients.md`), with thin Lambda adapters and manual OpenTelemetry.
|
|
4
|
+
|
|
5
|
+
Checked 2026-11-12. Standard-library entries use Go `1.27`; use `aws-guidance` for deployment and service constraints.
|
|
6
|
+
|
|
7
|
+
## Runtime and middleware
|
|
8
|
+
|
|
9
|
+
| Concern | Default | Use instead when | Avoid (why) |
|
|
10
|
+
| --- | --- | --- | --- |
|
|
11
|
+
| AWS SDK | `github.com/aws/aws-sdk-go-v2` `>= 1` root and independently pinned service modules | Higher-level helpers below for a named mapping, transfer, caching or replay burden | Old SDK generation or assuming all v2 product modules share the root version. |
|
|
12
|
+
| Lambda runtime | `github.com/aws/aws-lambda-go` `>= 1`, `provided.al2023` | Existing HTTP server plus `aws-lambda-web-adapter` `>= 1` | Deprecated `go1.x` or `provided.al2`; assuming OS-only runtimes have SnapStart. |
|
|
13
|
+
| Single-purpose event | Typed `events`, `lambdacontext` and function wrappers from Lambda runtime `1` | Reviewed shared wrapper for repeated lifecycle concerns | Unchecked envelopes and request-specific mutable globals. |
|
|
14
|
+
| Single HTTP endpoint | The same `net/http` handler through `github.com/awslabs/aws-lambda-go-api-proxy/httpadapter` `>= 0.16` with Lambda runtime `1` | Web Adapter `1` when reusing a listening server | A separate Lambda framework or route implementation for the same HTTP surface. |
|
|
15
|
+
| Multi-route/container reuse | The same `net/http` handler/middleware through Web Adapter `1` | The API Proxy `httpadapter` `>= 0.16` for an event-handler deployment after event-envelope compatibility tests | Two routers/body parsers; assuming non-HTTP forwarding implements partial-batch acknowledgment. |
|
|
16
|
+
| Lambda tracing | OTel SDK `>= 1`, contrib `otellambda` `>= 0.72`, collector extension pinned in IaC | Collector's X-Ray exporter for existing storage requirements | Assuming Go has Python-style auto-instrumentation layers; new X-Ray SDK dependency. |
|
|
17
|
+
| Local testing | `testing`, synthetic typed events and `httptest`; standard library is sufficient for adapters | SAM local invocation, DynamoDB Local or LocalStack for selected integration behavior | Emulator success presented as proof of IAM, event-source or telemetry correctness. |
|
|
18
|
+
|
|
19
|
+
Official Powertools has no Go distribution. Do not label community ports AWS-supported. These substitutes cover the same concerns without inventing a replacement framework.
|
|
20
|
+
|
|
21
|
+
## Powertools substitutes
|
|
22
|
+
|
|
23
|
+
| Concern | Default | Use instead when | Avoid (why) |
|
|
24
|
+
| --- | --- | --- | --- |
|
|
25
|
+
| Logger | `log/slog` JSON with invocation-scoped request ID, cold-start and active trace/span attributes | Existing structured logger | Payloads/secrets in logs; ordinary slog does not add trace correlation automatically. |
|
|
26
|
+
| Metrics | OTel metrics `>= 1` and collector when already standardized | `prozz/aws-embedded-metrics-golang` (last release 2021-09-30; review ownership and pin) for CloudWatch business metrics without a Collector | Casual handwritten EMF wire formats or duplicate metric publication. |
|
|
27
|
+
| Parser/validation | Lambda runtime `1` event types, `encoding/json` and explicit checks | Validator `10` for DTO tags | Recreating AWS event schemas or treating decoding as authorization. |
|
|
28
|
+
| Batch | Lambda runtime `1` partial-response types plus a reviewed shared processor | Event-specific adapter when response semantics differ | Whole-batch retry for isolated failures; silently acknowledging failed records. |
|
|
29
|
+
| Idempotency | SDK v2 DynamoDB conditional writes, in-progress/completed state and TTL | Downstream stable operation token | Handler-local check-then-write deduplication or invocation IDs as keys. |
|
|
30
|
+
| Parameters | SDK v2 with bounded TTL cache or approved Lambda extension | AppConfig Agent for local cached polling/token management | Secrets fetch for every record, unbounded caches or stale credentials. |
|
|
31
|
+
| Feature flags | `github.com/open-feature/go-sdk` `>= 1`; simple runtime toggles: contrib `providers/aws-ssm` `>= 1.0`, no cache, `GetParameter` per evaluation, shared 40 TPS default; evaluate once per request; object flags return default | Kill switches/rollout: third-party `github.com/Arthur1/openfeature-provider-go-aws-appconfig` `>= 0.4`, Agent only, boolean flags, review dependency; deploy-time flags: contrib `providers/flagd` `>= 0.8` over flags.yaml | Ask before writing a missing provider; no silent Agent wrapper fallback; see `aws-guidance` and `quality-code-design`'s `feature-flags.md`. |
|
|
32
|
+
| Data masking | Data minimization, allowlisted structured attributes and reviewed redaction | Approved encryption/masking component for a defined requirement | Homemade cryptographic primitives. |
|
|
33
|
+
| Routing | Standard `net/http` middleware for HTTP; typed dispatch for events | Web Adapter `1` for server reuse | HTTP middleware presented as a queue batch-processing engine. |
|
|
34
|
+
|
|
35
|
+
## Service clients versus raw SDK
|
|
36
|
+
|
|
37
|
+
| Concern | Default | Use instead when | Avoid (why) |
|
|
38
|
+
| --- | --- | --- | --- |
|
|
39
|
+
| DynamoDB | SDK `feature/dynamodb/attributevalue` `>= 1` and `expression` `>= 1` | `github.com/guregu/dynamo/v2` `>= 2` for fluent queries and struct marshaling | Assuming a model library designs keys, locking and cursor semantics; transaction-conflict retries are not automatic in dynamo v2. |
|
|
40
|
+
| Valkey/ElastiCache | `github.com/valkey-io/valkey-go` `>= 1` for Go protocol API | `github.com/valkey-io/valkey-glide/go/v2` `>= 2` for cross-language behavior/IAM automation; rueidis `1` or go-redis `9` for existing ecosystems | AWS management SDK for data commands; throughput-only comparisons. |
|
|
41
|
+
| Cache IAM and invalidation | Renewable credentials and cluster-aware protocol client | GLIDE `2` built-in IAM behavior where binding/deployment compatibility is verified | Static tokens; GLIDE caching defaults to TTL-only and its invalidation behavior varies by binding. |
|
|
42
|
+
| S3 | SDK v2 S3 client/`PresignClient` for simple objects | `feature/s3/transfermanager` `>= 0.5` for automatic multipart, directories and progress | New deprecated manager upload/download APIs; proxying objects when presigned access suffices. |
|
|
43
|
+
| SQS/SNS/EventBridge | SDK v2 service clients; Lambda-managed consumers where suitable | Explicit SQS polling lifecycle outside Lambda; EventBridge-generated types for schemas | Inventing an unverified worker-framework recommendation; EventBridge bindings do not orchestrate consumers. |
|
|
44
|
+
| Secrets Manager | Parameters/Secrets Lambda Extension or SDK v2 bounded retrieval | `github.com/aws/aws-secretsmanager-caching-go` `>= 1` only after released dependency compatibility review | Assuming master branch's SDK-v2 migration exists in the checked old release. |
|
|
45
|
+
| SSM/AppConfig | SDK v2 for writes/freshness; AppConfig Agent for cached reads | Explicit bounded SDK cache outside supported agent deployments | Reimplementing token polling casually; assuming identical freshness for every provider. |
|
|
46
|
+
| Cognito/JWT | `github.com/lestrrat-go/jwx/v3` `>= 3` with JWKS cache and Cognito claim policy | Existing audited JWT middleware | Cognito management SDK as a verifier; no issuer/client/token-use checks. |
|
|
47
|
+
| RDS/Aurora SQL | `github.com/jackc/pgx/v5/pgxpool` `>= 5` plus SDK `feature/rds/auth` `>= 1` for IAM | AWS Advanced Go Wrapper `awssql` module `1` for required topology/failover/IAM features; verify driver-plugin submodule lines | Root wrapper version substituted for every submodule; redundant pools or unverified proxy/plugin compatibility. |
|
|
48
|
+
| Aurora Data API | SDK v2 `service/rdsdata` `>= 1` for explicit Data API calls | Ordinary pooled SQL driver when network/deployment permits | Treating Data API as identical to a SQL socket; unverified engine/region support. |
|
|
49
|
+
| Aurora DSQL | `github.com/awslabs/aurora-dsql-connectors/go/pgx` `>= 0.5` when DSQL is selected | Explicit SDK IAM signing with the supported driver | Treating DSQL as interchangeable PostgreSQL; asserting this is the definitive latest submodule from a stale registry banner. |
|
|
50
|
+
| OpenSearch | `github.com/opensearch-project/opensearch-go/v4` `>= 4` with AWS signer | Direct signed HTTP for tiny integrations | Wrong signer service: domains use `es`, Serverless uses `aoss`; frozen temporary credentials. |
|
|
51
|
+
| Kinesis | SDK v2 for publishing; Lambda-managed consumer for ordinary processing | KCL `3` MultiLangDaemon deployment when leasing/checkpoint lifecycle is needed | Inventing native official Go KCL; KCL `1` support ended in 2026. |
|
|
52
|
+
| MSK | Kafka client `github.com/twmb/franz-go` `>= 1` plus `github.com/aws/aws-msk-iam-sasl-signer-go` `>= 1` | Existing compatible Kafka client and auth integration | AWS management SDK for records; static OAuth tokens without refresh. |
|
|
53
|
+
| Bedrock | SDK v2 `service/bedrockruntime` `>= 1` Converse/streaming | Application tool loop for demonstrated orchestration needs | Inventing official Go Strands bindings or adding an agent framework for one call. |
|
|
54
|
+
| CloudWatch | OTel `>= 1` plus collector for standardized telemetry | SDK v2 for explicit metrics, queries and control-plane calls | Assuming EMF transports itself outside Lambda or using unbounded dimensions. |
|
|
55
|
+
| Durable execution | `github.com/aws/aws-durable-execution-sdk-go` `>= 1` for replay/checkpoints | Step Functions for cross-service orchestration; raw SDK for execution management | Ordinary Lambda API calls presented as replay runtime; replay-unsafe effects. |
|
|
56
|
+
|
|
57
|
+
## Rules
|
|
58
|
+
|
|
59
|
+
- Initialize reusable clients/providers outside the handler. Invocation wrappers parse/validate, call a business function and serialize; clear invocation-local fields afterward.
|
|
60
|
+
- Follow the ADOT Go recipe for invocation-end flush. Do not shut down reusable OTel providers each invocation. Pin the collector extension and test architecture/region support.
|
|
61
|
+
- X-Ray SDKs/daemon entered security-only maintenance on `2026-02-25`; the current timeline has no scheduled maintenance end. This is not X-Ray service retirement.
|
|
62
|
+
- Enable `ReportBatchItemFailures` in IaC; test poison records and FIFO ordering. Model stable business-operation keys and do not promise exactly-once external effects.
|
|
63
|
+
- Use raw SDK calls for simple operations, administration, exact request semantics or features missing from the wrapper. Use protocol clients for database/search/cache/Kafka data planes.
|
|
64
|
+
- Verify IAM token refresh and reconnect behavior. ElastiCache tokens last `15` minutes; IAM connections need reauthentication before the documented `12`-hour disconnect. MemoryDB/binding behavior needs its own check.
|
|
65
|
+
- Unit-test business logic and adapter failures. Deploy isolated tests for AWS behavior. Local tools do not replace cloud evidence.
|
|
66
|
+
- Verify the HTTP adapter's pinned API Gateway event version and streaming behavior. The runtime package and API Proxy adapter are separate modules.
|
|
67
|
+
|
|
68
|
+
## Sources
|
|
69
|
+
|
|
70
|
+
- [Go Lambda](https://docs.aws.amazon.com/lambda/latest/dg/lambda-golang.html), [SDK v2](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2), [Powertools inventory](https://github.com/aws-powertools), [Web Adapter](https://github.com/aws/aws-lambda-web-adapter), [ADOT Go recipe](https://aws-otel.github.io/docs/getting-started/lambda/lambda-go), [otellambda](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-lambda-go/otellambda), [X-Ray timeline](https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-daemon-timeline.html).
|
|
71
|
+
- [API Proxy standard-handler adapter](https://github.com/awslabs/aws-lambda-go-api-proxy#standard-library), [API Proxy module line](https://pkg.go.dev/github.com/awslabs/aws-lambda-go-api-proxy).
|
|
72
|
+
- [DynamoDB helpers](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue), [expressions](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/feature/dynamodb/expression), [dynamo retry guidance](https://github.com/guregu/dynamo), [DynamoDB Local](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html).
|
|
73
|
+
- [GLIDE Go](https://pkg.go.dev/github.com/valkey-io/valkey-glide/go/v2), [GLIDE caching](https://glide.valkey.io/concepts/client-features/client-side-caching/), [ElastiCache IAM](https://docs.aws.amazon.com/AmazonElastiCache/latest/dg/auth-iam.html), [S3 transfers](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager).
|
|
74
|
+
- [Secrets cache](https://pkg.go.dev/github.com/aws/aws-secretsmanager-caching-go), [cache source compatibility](https://github.com/aws/aws-secretsmanager-caching-go/blob/master/go.mod), [Lambda secrets options](https://docs.aws.amazon.com/lambda/latest/dg/with-secrets-manager.html), [AppConfig Agent](https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-agent.html), [JWKS/JOSE](https://pkg.go.dev/github.com/lestrrat-go/jwx/v3).
|
|
75
|
+
- [Advanced Go Wrapper](https://github.com/aws/aws-advanced-go-wrapper), [awssql checked module](https://pkg.go.dev/github.com/aws/aws-advanced-go-wrapper/awssql), [DSQL Go connector](https://pkg.go.dev/github.com/awslabs/aurora-dsql-connectors/go/pgx), [RDS IAM signer](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/feature/rds/auth), [OpenSearch signing](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-clients.html).
|
|
76
|
+
- [KCL non-Java consumers](https://docs.aws.amazon.com/streams/latest/dev/develop-kcl-consumers-non-java.html), [MSK signer](https://pkg.go.dev/github.com/aws/aws-msk-iam-sasl-signer-go), [Bedrock Converse](https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference-call.html), [durable Go SDK](https://github.com/aws/aws-durable-execution-sdk-go/releases/tag/v1.0.0), [Lambda testing](https://docs.aws.amazon.com/lambda/latest/dg/testing-guide.html).
|