Gofmt formats Go programs. We run gofmt -s
on your code, where -s
is for the "simplify" command
No problems detected. Good job!
go vet
examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.
No problems detected. Good job!
Gocyclo calculates cyclomatic complexities of functions in Go source code.
The cyclomatic complexity of a function is calculated according to the following rules:
1 is the base complexity of a function
+1 for each 'if', 'for', 'case', '&&' or '||'
Go Report Card warns on functions with cyclomatic complexity > 15.
No problems detected. Good job!
Golint is a linter for Go source code.
-
akc-go-sdk/common/msgResponse.go
- Line 12: warning: exported const OK should have comment (or a comment on this block) or be unexported (golint)
- Line 17: warning: exported const SUCCESS should have comment (or a comment on this block) or be unexported (golint)
- Line 38: warning: exported var ResCodeDict should have comment or be unexported (golint)
- Line 60: warning: exported type InvokeResponse should have comment or be unexported (golint)
- Line 66: warning: exported type ResponseSuccess should have comment or be unexported (golint)
- Line 72: warning: exported type ResponseError should have comment or be unexported (golint)
- Line 77: warning: exported function RespondSuccess should have comment or be unexported (golint)
- Line 88: warning: exported function RespondError should have comment or be unexported (golint)
- Line 96: warning: exported function GetQueryResultForQueryString should have comment or be unexported (golint)
-
akc-go-sdk/util/akcqueryiterator.go
- Line 5: warning: should not use dot imports (golint)
- Line 18: warning: exported method AkcQueryIterator.HasNext should have comment or be unexported (golint)
- Line 22: warning: exported method AkcQueryIterator.Length should have comment or be unexported (golint)
- Line 26: warning: exported method AkcQueryIterator.Next should have comment or be unexported (golint)
- Line 45: warning: exported method AkcQueryIterator.Close should have comment or be unexported (golint)
-
akc-go-sdk/util/daoHandle.go
- Line 14: warning: comment on exported function Changeinfo should be of the form "Changeinfo ..." (golint)
- Line 15: warning: don't use underscores in Go names; func parameter row_key should be rowKey (golint)
- Line 23: warning: don't use underscores in Go names; func parameter row_key should be rowKey (golint)
- Line 28: warning: comment on exported function Createdata should be of the form "Createdata ..." (golint)
- Line 29: warning: don't use underscores in Go names; func parameter row_key should be rowKey (golint)
- Line 30: warning: don't use underscores in Go names; var old_data should be oldData (golint)
- Line 31: warning: don't use underscores in Go names; var row_was_found should be rowWasFound (golint)
- Line 41: warning: comment on exported function Getdatabyid should be of the form "Getdatabyid ..." (golint)
- Line 45: warning: don't use underscores in Go names; var row_was_found should be rowWasFound (golint)
- Line 56: warning: comment on exported function Getdatabyrowkeys should be of the form "Getdatabyrowkeys ..." (golint)
- Line 60: warning: don't use underscores in Go names; var row_was_found should be rowWasFound (golint)
- Line 71: warning: comment on exported function Getalldata should be of the form "Getalldata ..." (golint)
- Line 73: warning: don't use underscores in Go names; var row_json_bytes should be rowJSONBytes (golint)
- Line 80: warning: comment on exported function GetDataByID should be of the form "GetDataByID ..." (golint)
- Line 105: warning: comment on exported function GetDataByRowKeys should be of the form "GetDataByRowKeys ..." (golint)
- Line 131: warning: comment on exported function GetAllData should be of the form "GetAllData ..." (golint)
- Line 144: warning: don't use underscores in Go names; range var row_json_bytes should be rowJSONBytes (golint)
-
akc-go-sdk/util/dbHandle.go
- Line 16: warning: comment on exported const DefaultChannelName should be of the form "DefaultChannelName ..." (golint)
- Line 18: warning: exported const DefaultChaincodeName should have comment (or a comment on this block) or be unexported (golint)
-
akc-go-sdk/util/util.go
- Line 14: warning: comment on exported function InterfaceIsNilOrIsZeroOfUnderlyingType should be of the form "InterfaceIsNilOrIsZeroOfUnderlyingType ..." (golint)
- Line 19: warning: exported function CheckChaincodeFunctionCallWellFormedness should have comment or be unexported (golint)
- Line 19: warning: don't use underscores in Go names; func parameter expected_arg_count should be expectedArgCount (golint)
- Line 22: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
- Line 23: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
- Line 27: warning: comment on exported function MakeErrorRetval should be of the form "MakeErrorRetval ..." (golint)
- Line 28: warning: don't use underscores in Go names; func parameter error_message should be errorMessage (golint)
- Line 32: warning: comment on exported type GetTableRow_FailureOption should be of the form "GetTableRow_FailureOption ..." (with optional leading article) (golint)
- Line 33: warning: don't use underscores in Go names; type GetTableRow_FailureOption should be GetTableRowFailureOption (golint)
- Line 36: warning: exported const DONT_FAIL_IF_MISSING should have comment (or a comment on this block) or be unexported (golint)
- Line 43: warning: don't use underscores in Go names; func parameter table_name should be tableName (golint)
- Line 44: warning: don't use underscores in Go names; func parameter row_keys should be rowKeys (golint)
- Line 45: warning: don't use underscores in Go names; func parameter row_value should be rowValue (golint)
- Line 46: warning: don't use underscores in Go names; func parameter failure_option should be failureOption (golint)
- Line 47: warning: don't use underscores in Go names; func result composite_key should be compositeKey (golint)
- Line 99: warning: comment on exported function GetTableRow should be of the form "GetTableRow ..." (golint)
- Line 103: warning: don't use underscores in Go names; func parameter table_name should be tableName (golint)
- Line 104: warning: don't use underscores in Go names; func parameter row_keys should be rowKeys (golint)
- Line 105: warning: don't use underscores in Go names; func parameter row_value should be rowValue (golint)
- Line 106: warning: don't use underscores in Go names; func parameter failure_option should be failureOption (golint)
- Line 112: warning: comment on exported function GetTableRows should be of the form "GetTableRows ..." (golint)
- Line 116: warning: don't use underscores in Go names; func parameter table_name should be tableName (golint)
- Line 117: warning: don't use underscores in Go names; func parameter row_keys should be rowKeys (golint)
- Line 119: warning: don't use underscores in Go names; var state_query_iterator should be stateQueryIterator (golint)
- Line 128: warning: don't use underscores in Go names; var query_result_kv should be queryResultKv (golint)
- Line 140: warning: comment on exported type InsertTableRow_FailureOption should be of the form "InsertTableRow_FailureOption ..." (with optional leading article) (golint)
- Line 141: warning: don't use underscores in Go names; type InsertTableRow_FailureOption should be InsertTableRowFailureOption (golint)
- Line 144: warning: exported const DONT_FAIL_UPON_OVERWRITE should have comment (or a comment on this block) or be unexported (golint)
- Line 149: warning: comment on exported function InsertTableRow should be of the form "InsertTableRow ..." (golint)
- Line 157: warning: don't use underscores in Go names; func parameter table_name should be tableName (golint)
- Line 158: warning: don't use underscores in Go names; func parameter row_keys should be rowKeys (golint)
- Line 159: warning: don't use underscores in Go names; func parameter new_row_value should be newRowValue (golint)
- Line 160: warning: don't use underscores in Go names; func parameter failure_option should be failureOption (golint)
- Line 161: warning: don't use underscores in Go names; func parameter old_row_value should be oldRowValue (golint)
- Line 173: warning: don't use underscores in Go names; var composite_key should be compositeKey (golint)
- Line 210: warning: don't use underscores in Go names; func parameter table_name should be tableName (golint)
- Line 211: warning: don't use underscores in Go names; func parameter row_keys should be rowKeys (golint)
- Line 212: warning: don't use underscores in Go names; func parameter new_row_value should be newRowValue (golint)
- Line 248: warning: comment on exported function DeleteTableRow should be of the form "DeleteTableRow ..." (golint)
- Line 251: warning: don't use underscores in Go names; func parameter table_name should be tableName (golint)
- Line 252: warning: don't use underscores in Go names; func parameter row_keys should be rowKeys (golint)
- Line 253: warning: don't use underscores in Go names; func parameter old_row_value should be oldRowValue (golint)
- Line 254: warning: don't use underscores in Go names; func parameter failure_option should be failureOption (golint)
- Line 260: warning: don't use underscores in Go names; var composite_key should be compositeKey (golint)
- Line 306: warning: comment on exported function MockInitTransaction should be of the form "MockInitTransaction ..." (golint)
-
akc-go-sdk/main.go
- Line 6: warning: should not use dot imports (golint)
- Line 27: warning: comment on exported method Chaincode.Init should be of the form "Init ..." (golint)
- Line 34: warning: comment on exported method Chaincode.Invoke should be of the form "Invoke ..." (golint)
-
akc-go-sdk/common/logger.go
- Line 11: warning: exported var Logger should have comment or be unexported (golint)
- Line 13: warning: exported function GetLine should have comment or be unexported (golint)
- Line 29: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
Checks whether your project has a LICENSE file.
No problems detected. Good job!
IneffAssign detects ineffectual assignments in Go code.
No problems detected. Good job!
Misspell Finds commonly misspelled English words