Commit 80f1acd4 authored by liuyuhang's avatar liuyuhang

Update linter_warning处理.md

parent a272ebad
## 本地查看自己所修改模块golint warning的命令:
## 本地查看自己所修改模块golint warning的命令:
......@@ -194,6 +194,7 @@ func (acc *DB) depositBalance(execaddr string, amount int64) (*types.Receipt, er
### 2、
> * ineffectual assignment to end
```
func maxSubList(list []time.Duration) (sub []time.Duration) {
start := 0
......@@ -202,7 +203,6 @@ func maxSubList(list []time.Duration) (sub []time.Duration) {
return list
}
for i := 0; i < len(list); i++ {
.....
if abs(nextheight-list[i]) > time.Millisecond*100 {
end = i + 1
if len(sub) < (end - start) {
......@@ -217,7 +217,7 @@ func maxSubList(list []time.Duration) (sub []time.Duration) {
}
```
改为
改为
```
func maxSubList(list []time.Duration) (sub []time.Duration) {
if len(list) == 0 {
......@@ -240,4 +240,4 @@ func maxSubList(list []time.Duration) (sub []time.Duration) {
}
}
```
\ No newline at end of file
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment