This commit is contained in:
suyl
2021-06-21 18:58:57 +08:00
parent 8ce4c93c5f
commit fbb0e8a840
7 changed files with 54 additions and 42 deletions

View File

@@ -2,7 +2,6 @@ package jdshopapi
import (
"encoding/base64"
"fmt"
"testing"
"git.rosy.net.cn/baseapi/utils"
@@ -111,38 +110,10 @@ func TestFindStoreInfoByExtStoreId(t *testing.T) {
t.Log(utils.Format4Output(result, false))
}
func TestWIREHL(t *testing.T) {
fmt.Println(largeGroupPositions("abcdddeeeeaabbbcd"))
}
func largeGroupPositions(s string) (result [][]int) {
var (
l = 0
r = 1
count int
)
fmt.Println(len(s))
for {
fmt.Println(l, r, count)
if r == len(s) {
if count > 1 {
result = append(result, []int{l, r - 1})
count = 0
}
break
}
if s[l] != s[r] {
if count > 1 {
result = append(result, []int{l, r - 1})
count = 0
}
l = r
r++
count = 0
} else {
count++
r++
}
func TestUpdateStoreStatusAPI(t *testing.T) {
err := api.UpdateStoreStatusAPI(69353633443, 0)
if err != nil {
t.Fatal(err)
}
return result
// t.Log(utils.Format4Output(result, false))
}