Skip to content

Commit

Permalink
fix: go workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Apr 25, 2022
1 parent 82673fa commit 3ce9a65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion module.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package gomoddirectives

import (
"bytes"
"encoding/json"
"errors"
"fmt"
Expand Down Expand Up @@ -29,7 +30,7 @@ func GetModuleFile() (*modfile.File, error) {
}

var v modInfo
err = json.Unmarshal(raw, &v)
err = json.NewDecoder(bytes.NewBuffer(raw)).Decode(&v)
if err != nil {
return nil, fmt.Errorf("unmarshaling error: %w: %s", err, string(raw))
}
Expand Down

0 comments on commit 3ce9a65

Please sign in to comment.