Skip to content

Commit

Permalink
feat(go): rename wd_info_shot -> wd_short_info
Browse files Browse the repository at this point in the history
change ParseWoodpeckerInfo2Shot -> ParseWoodpeckerInfo2Short

BREAKING CHANGE: must change package wd_info_shot -> wd_short_info and method
ParseWoodpeckerInfo2Shot -> ParseWoodpeckerInfo2Short

fix #34
  • Loading branch information
sinlov committed Mar 16, 2024
1 parent b26f356 commit a196ab9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions wd_mock_test/wd_info_short_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package wd_mock_test
import (
"github.com/sebdah/goldie/v2"
"github.com/woodpecker-kit/woodpecker-tools/wd_info"
"github.com/woodpecker-kit/woodpecker-tools/wd_info_shot"
"github.com/woodpecker-kit/woodpecker-tools/wd_mock"
"github.com/woodpecker-kit/woodpecker-tools/wd_short_info"
"testing"
)

func TestParseWoodpeckerInfo2Shot(t *testing.T) {
// mock ParseWoodpeckerInfo2Shot
// mock ParseWoodpeckerInfo2Short
type args struct {
info wd_info.WoodpeckerInfo
}
Expand Down Expand Up @@ -57,12 +57,12 @@ func TestParseWoodpeckerInfo2Shot(t *testing.T) {
goldie.WithDiffEngine(goldie.ClassicDiff),
)

// do ParseWoodpeckerInfo2Shot
gotResult := wd_info_shot.ParseWoodpeckerInfo2Shot(tc.args.info)
// do ParseWoodpeckerInfo2Short
gotResult := wd_short_info.ParseWoodpeckerInfo2Short(tc.args.info)
if tc.wantErr != nil {
return
}
// verify ParseWoodpeckerInfo2Shot
// verify ParseWoodpeckerInfo2Short
g.AssertJson(t, t.Name(), gotResult)
})
}
Expand Down
4 changes: 2 additions & 2 deletions wd_info_shot/shot_parse.go → wd_short_info/shot_parse.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package wd_info_shot
package wd_short_info

import "github.com/woodpecker-kit/woodpecker-tools/wd_info"

func ParseWoodpeckerInfo2Shot(info wd_info.WoodpeckerInfo) WoodpeckerInfoShort {
func ParseWoodpeckerInfo2Short(info wd_info.WoodpeckerInfo) WoodpeckerInfoShort {
short := WoodpeckerInfoShort{
Repo: Repo{
Scm: info.RepositoryInfo.CIRepoScm,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package wd_info_shot
package wd_short_info

import _ "github.com/woodpecker-kit/woodpecker-tools/wd_info"

Expand Down

0 comments on commit a196ab9

Please sign in to comment.