Skip to content

Commit

Permalink
[*] fix golint complains
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryikh committed Sep 15, 2018
1 parent 64d2a5a commit c4da6e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lgensemble_io.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ func LGEnsembleFromReader(reader *bufio.Reader) (*LGEnsemble, error) {
if err := mapValueCompare(params, "num_tree_per_iteration", "1"); err != nil {
return nil, err
}
if maxFeatureIdx, err := mapValueToInt(params, "max_feature_idx"); err != nil {
maxFeatureIdx, err := mapValueToInt(params, "max_feature_idx")
if err != nil {
return nil, err
} else {
e.MaxFeatureIdx = uint32(maxFeatureIdx)
}
e.MaxFeatureIdx = uint32(maxFeatureIdx)

treeSizesStr, isFound := params["tree_sizes"]
if !isFound {
Expand Down
6 changes: 3 additions & 3 deletions mat_io.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func DenseMatFromLibsvm(reader *bufio.Reader, limit uint32, skipFirstColumn bool
return mat, fmt.Errorf("too few columns")
}

column := uint32(0)
var column uint32
for col := startIndex; col < uint32(len(tokens)); col++ {
if len(tokens[col]) == 0 {
break
Expand Down Expand Up @@ -93,7 +93,7 @@ func CSRMatFromLibsvm(reader *bufio.Reader, limit uint32, skipFirstColumn bool)
}

mat.RowHeaders = append(mat.RowHeaders, uint32(len(mat.Values)))
column := uint32(0)
var column uint32
for col := startIndex; col < uint32(len(tokens)); col++ {
if len(tokens[col]) == 0 {
break
Expand Down Expand Up @@ -150,7 +150,7 @@ func DenseMatFromCsv(reader *bufio.Reader,
}
tokens := strings.Split(line, delimiter)

column := uint32(0)
var column uint32
for col := startIndex; col < uint32(len(tokens)); col++ {
var value float64
if len(tokens[col]) == 0 {
Expand Down

0 comments on commit c4da6e5

Please sign in to comment.