Skip to content

Commit afd1273

Browse files
fix go vet
1 parent 1e24aa1 commit afd1273

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

data/builder/builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type Builder struct {
4949
func DataType(b *Builder, dataType int64) {
5050
_, ok := data.DataTypeNames[dataType]
5151
if !ok {
52-
panic(data.ErrInvalidDataType{dataType})
52+
panic(data.ErrInvalidDataType{DataType: dataType})
5353
}
5454
qp.MapEntry(b.MapAssembler, data.Field__DataType, qp.Int(dataType))
5555
b.hasDataType = true

directory/basicdir.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type _UnixFSBasicDir struct {
2222

2323
func NewUnixFSBasicDir(ctx context.Context, substrate dagpb.PBNode, nddata data.UnixFSData, _ *ipld.LinkSystem) (ipld.Node, error) {
2424
if nddata.FieldDataType().Int() != data.Data_Directory {
25-
return nil, data.ErrWrongNodeType{data.Data_Directory, nddata.FieldDataType().Int()}
25+
return nil, data.ErrWrongNodeType{Expected: data.Data_Directory, Actual: nddata.FieldDataType().Int()}
2626
}
2727
return &_UnixFSBasicDir{_substrate: substrate}, nil
2828
}

hamt/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (hb *hashBits) next(i int) int {
5959

6060
func validateHAMTData(nd data.UnixFSData) error {
6161
if nd.FieldDataType().Int() != data.Data_HAMTShard {
62-
return data.ErrWrongNodeType{data.Data_HAMTShard, nd.FieldDataType().Int()}
62+
return data.ErrWrongNodeType{Expected: data.Data_HAMTShard, Actual: nd.FieldDataType().Int()}
6363
}
6464

6565
if !nd.FieldHashType().Exists() || uint64(nd.FieldHashType().Must().Int()) != HashMurmur3 {

0 commit comments

Comments
 (0)