Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Commit 8c970fe

Browse files
authored
Merge pull request #25 from rootlyhq/dependabot/go_modules/github.com/rootlyhq/rootly-go-0.8.0
chore(deps): bump github.com/rootlyhq/rootly-go from 0.2.0 to 0.8.0
2 parents 3dafef0 + 1553b1d commit 8c970fe

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/gleich/lumber v1.1.4
1111
github.com/gleich/release v0.0.0-20250104214451-94c42533123f
1212
github.com/oapi-codegen/oapi-codegen/v2 v2.5.1
13-
github.com/rootlyhq/rootly-go v0.2.0
13+
github.com/rootlyhq/rootly-go v0.8.0
1414
github.com/spf13/cobra v1.10.2
1515
github.com/stretchr/testify v1.11.1
1616
golang.org/x/sys v0.38.0 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
5656
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
5757
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
5858
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
59-
github.com/rootlyhq/rootly-go v0.2.0 h1:ipfi7qcjoNBeBhra2E6iknjD168hCjxkjLabc1HdFVg=
60-
github.com/rootlyhq/rootly-go v0.2.0/go.mod h1:/vIONsKgglT/kXbqB3WYx+cZvZKvXAsdpf6yLERa3Ek=
59+
github.com/rootlyhq/rootly-go v0.8.0 h1:VVD7IEmwfmjekmxENW2WMmMPdDvXJ4RycwYslQ9LFdc=
60+
github.com/rootlyhq/rootly-go v0.8.0/go.mod h1:ksTnoO7/A4oDC4dg40akBgfjw91P+lWJQz8JPmd45Ow=
6161
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
6262
github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=
6363
github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=

pkg/api/convert.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ import (
1010
"github.com/rootlyhq/rootly-go"
1111
)
1212

13-
// Convert a map to a APIObject
14-
func convertObject(maps []map[string]string) []struct {
15-
Key string "json:\"key\""
16-
Value string "json:\"value\""
17-
} {
18-
objects := []struct {
13+
// Convert a map to nullable API objects
14+
func convertObject(maps []map[string]string) []nullable.Nullable[struct {
15+
Key string `json:"key"`
16+
Value string `json:"value"`
17+
}] {
18+
var objects []nullable.Nullable[struct {
1919
Key string `json:"key"`
2020
Value string `json:"value"`
21-
}{}
21+
}]
2222
for _, mapData := range maps {
23-
objects = append(objects, struct {
23+
objects = append(objects, nullable.NewNullableWithValue(struct {
2424
Key string `json:"key"`
2525
Value string `json:"value"`
2626
}{
2727
Key: mapData["key"],
2828
Value: mapData["value"],
29-
})
29+
}))
3030
}
3131
return objects
3232
}
@@ -47,18 +47,18 @@ func convertPulse(pulse models.Pulse) (string, log.CtxErr) {
4747
data.Data.Attributes.StartedAt = nullable.NewNullableWithValue[time.Time](pulse.StartedAt)
4848
}
4949
if len(pulse.ServiceIds) != 0 {
50-
data.Data.Attributes.ServiceIds = nullable.NewNullableWithValue(pulse.ServiceIds)
50+
data.Data.Attributes.ServiceIDs = nullable.NewNullableWithValue(pulse.ServiceIds)
5151
}
5252
if len(pulse.EnvironmentIds) != 0 {
53-
data.Data.Attributes.EnvironmentIds = nullable.NewNullableWithValue(pulse.EnvironmentIds)
53+
data.Data.Attributes.EnvironmentIDs = nullable.NewNullableWithValue(pulse.EnvironmentIds)
5454
}
5555
labels := convertObject(pulse.Labels)
5656
if len(labels) != 0 {
57-
data.Data.Attributes.Labels = &labels
57+
data.Data.Attributes.Labels = labels
5858
}
5959
refs := convertObject(pulse.Refs)
6060
if len(refs) != 0 {
61-
data.Data.Attributes.Refs = &refs
61+
data.Data.Attributes.Refs = refs
6262
}
6363

6464
// Marshaling the data

0 commit comments

Comments
 (0)