aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/workflows/main.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-10-01 15:21:27 +0900
committerOphestra <cat@gensokyo.uk>2026-10-01 15:39:23 +0900
commita356dceedf0be29ae584866e540872ec1c048f59 (patch)
tree45a85d0514fd60d923dd780caf2204f562d33e28 /internal/workflows/main.go
parentb0fa39b560d2caaaf0708c0828ae191311aee971 (diff)
internal/workflows: migrate release workflow
This also migrates from the unmaintained release action and improves configuration so the new release is created as a draft, and the tag annotation is automatically added as the release body. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/workflows/main.go')
-rw-r--r--internal/workflows/main.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/workflows/main.go b/internal/workflows/main.go
index 46f7e054..dca480a5 100644
--- a/internal/workflows/main.go
+++ b/internal/workflows/main.go
@@ -21,16 +21,16 @@ type KV[T any] struct {
type Map[T any] []KV[T]
// MarshalJSON encodes m as a key-value pair in JSON.
-func (m *Map[T]) MarshalJSON() ([]byte, error) {
- if m == nil || len(*m) == 0 {
+func (m Map[T]) MarshalJSON() ([]byte, error) {
+ if m == nil || len(m) == 0 {
return []byte("{}"), nil
}
- buf := bytes.NewBuffer(make([]byte, 0, len(*m)<<5))
+ buf := bytes.NewBuffer(make([]byte, 0, len(m)<<5))
buf.WriteByte('{')
- last := len(*m) - 1
- for i, pair := range *m {
+ last := len(m) - 1
+ for i, pair := range m {
p, err := json.Marshal(pair.K)
if err != nil {
return nil, fmt.Errorf("key %q: %w", pair.K, err)