Skip to content

Commit 7c01f90

Browse files
committed
Fix lint warings
1 parent c92b2a2 commit 7c01f90

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

internal/examples/basic/sorts/sort_slice.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func SortSliceUnStable() error {
2828
// スライス以外を渡すと panic する。
2929
// -----------------------------------------------
3030
var (
31-
sli1 = make([]int, 0, 0)
31+
sli1 = make([]int, 0)
3232
)
3333

3434
for i := 10; i > 0; i-- {
@@ -53,6 +53,7 @@ func SortSliceUnStable() error {
5353
}()
5454

5555
s := "helloworld"
56+
//lint:ignore SA1028 It's ok because this is just a example.
5657
sort.Slice(s, func(i, j int) bool {
5758
return s[i] < s[j]
5859
})

internal/examples/basic/sorts/sort_slicestable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func SortSliceStable() error {
2828
// スライス以外を渡すと panic する。
2929
// -----------------------------------------------
3030
var (
31-
sli1 = make([]int, 0, 0)
31+
sli1 = make([]int, 0)
3232
)
3333

3434
for i := 10; i > 0; i-- {

0 commit comments

Comments
 (0)