Skip to content

Commit

Permalink
Remove sync.Mutex pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
VojtechVitek committed Aug 20, 2024
1 parent 7d172c9 commit d4b5e3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions devslog.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
type developHandler struct {
opts Options
goas []groupOrAttrs
mu *sync.Mutex
mu sync.Mutex
out io.Writer
}

Expand Down Expand Up @@ -69,7 +69,7 @@ type groupOrAttrs struct {
}

func NewHandler(out io.Writer, o *Options) *developHandler {
h := &developHandler{out: out, mu: &sync.Mutex{}}
h := &developHandler{out: out}
if o != nil {
h.opts = *o

Expand Down
4 changes: 0 additions & 4 deletions devslog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ func test_NewHandlerDefaults(t *testing.T) {
if h.out == nil {
t.Errorf("Expected writer to be initialized")
}

if h.mu == nil {
t.Errorf("Expected mutex to be initialized")
}
}

func test_NewHandlerWithOptions(t *testing.T) {
Expand Down

0 comments on commit d4b5e3b

Please sign in to comment.