Skip to content

Commit 9b6239a

Browse files
authored
feat(exp): rename AppendNextActions to AppendNext (#452)
Use a smaller name, as we already refer to actions in the package name: - `actionutils.AppendNextActions ` => `actionutils.AppendNext`
1 parent 9c1966b commit 9b6239a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

hcloud/exp/actionutils/actions.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package actionutils
22

33
import "github.com/hetznercloud/hcloud-go/v2/hcloud"
44

5-
// AppendNextActions return the action and the next actions in a new slice.
6-
func AppendNextActions(action *hcloud.Action, nextActions []*hcloud.Action) []*hcloud.Action {
5+
// AppendNext return the action and the next actions in a new slice.
6+
func AppendNext(action *hcloud.Action, nextActions []*hcloud.Action) []*hcloud.Action {
77
all := make([]*hcloud.Action, 0, 1+len(nextActions))
88
all = append(all, action)
99
all = append(all, nextActions...)

hcloud/exp/actionutils/actions_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import (
88
"github.com/hetznercloud/hcloud-go/v2/hcloud"
99
)
1010

11-
func TestAppendNextActions(t *testing.T) {
11+
func TestAppendNext(t *testing.T) {
1212
action := &hcloud.Action{ID: 1}
1313
nextActions := []*hcloud.Action{{ID: 2}, {ID: 3}}
1414

15-
actions := AppendNextActions(action, nextActions)
15+
actions := AppendNext(action, nextActions)
1616

1717
assert.Equal(t, []*hcloud.Action{{ID: 1}, {ID: 2}, {ID: 3}}, actions)
1818
}

0 commit comments

Comments
 (0)