Skip to content

Commit e67b3c4

Browse files
refactor: remove immutable pkg
1 parent 92be088 commit e67b3c4

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

common/convert.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func ConvertIssueTypesToMap(issueTypes []network.IssueType) (map[string]branch.T
7676

7777
var buffer strings.Builder
7878
for _, i := range issueTypes {
79-
_, ok := issue.Ignored.Get(i.Id)
79+
_, ok := issue.Ignored[i.Id]
8080
if ok {
8181
buffer.WriteString("- ")
8282
buffer.WriteString(i.Name)

go.mod

-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ module brcha
33
go 1.22.3
44

55
require (
6-
github.com/benbjohnson/immutable v0.4.3
76
github.com/fatih/color v1.17.0
87
github.com/joho/godotenv v1.5.1
98
)
109

1110
require (
1211
github.com/mattn/go-colorable v0.1.13 // indirect
1312
github.com/mattn/go-isatty v0.0.20 // indirect
14-
golang.org/x/exp v0.0.0-20220518171630-0b5c67f07fdf // indirect
1513
golang.org/x/sys v0.18.0 // indirect
1614
)

go.sum

-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
github.com/benbjohnson/immutable v0.4.3 h1:GYHcksoJ9K6HyAUpGxwZURrbTkXA0Dh4otXGqbhdrjA=
2-
github.com/benbjohnson/immutable v0.4.3/go.mod h1:qJIKKSmdqz1tVzNtst1DZzvaqOU1onk1rc03IeM3Owk=
31
github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4=
42
github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI=
53
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
@@ -9,8 +7,6 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk
97
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
108
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
119
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
12-
golang.org/x/exp v0.0.0-20220518171630-0b5c67f07fdf h1:oXVg4h2qJDd9htKxb5SCpFBHLipW6hXmL3qpUixS2jw=
13-
golang.org/x/exp v0.0.0-20220518171630-0b5c67f07fdf/go.mod h1:yh0Ynu2b5ZUe3MQfp2nM0ecK7wsgouWTDN0FNeJuIys=
1410
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1511
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1612
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=

issue/issue.go

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package issue
22

3-
import "github.com/benbjohnson/immutable"
4-
53
type Type struct {
64
Id string
75
Name string
@@ -25,12 +23,12 @@ const (
2523
// TODO: replace with your ignored <issue-types>
2624
var Ignored = buildMap()
2725

28-
func buildMap() *immutable.Map[string, bool] {
29-
builder := immutable.NewMapBuilder[string, bool](nil)
26+
func buildMap() map[string]bool {
27+
builder := make(map[string]bool)
3028

3129
builder.Set("4444", true) // Subtask
3230
// builder.Set("3333", true) // Bug
3331
// etc.
3432

35-
return builder.Map()
33+
return builder
3634
}

0 commit comments

Comments
 (0)