From c653ffa7a50aa345f9dffa0ea66b5ca90aa21ef5 Mon Sep 17 00:00:00 2001 From: john Date: Tue, 30 Oct 2018 18:52:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84garray=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TODO | 2 ++ g/container/garray/garray_sorted_int.go | 4 ++-- g/container/garray/garray_sorted_interface.go | 4 ++-- g/container/garray/garray_sorted_string.go | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index 312064cc3..7ba360abe 100644 --- a/TODO +++ b/TODO @@ -41,6 +41,8 @@ ghttp hook回调使用方式在注册路由比较多的时候,优先级可能 https://github.com/namreg/godown https://github.com/Masterminds/sprig gform参考 https://gohouse.github.io/gorose/dist/index.html 进行改进 +完善配置管理章节,说明默认的配置文件更改方式; +完善gform配置管理说明,g.DB/Database和gdb.New的区别; DONE: diff --git a/g/container/garray/garray_sorted_int.go b/g/container/garray/garray_sorted_int.go index eebcd7652..ecf915bd1 100644 --- a/g/container/garray/garray_sorted_int.go +++ b/g/container/garray/garray_sorted_int.go @@ -126,11 +126,11 @@ func (a *SortedIntArray) Slice() []int { // 查找指定数值的索引位置,返回索引位置(具体匹配位置或者最后对比位置)及查找结果 // 返回值: 最后比较位置, 比较结果 -func (a *SortedIntArray) Search(value int) (int, int) { +func (a *SortedIntArray) Search(value int) (index int, result int) { return a.binSearch(value, true) } -func (a *SortedIntArray) binSearch(value int, lock bool) (int, int) { +func (a *SortedIntArray) binSearch(value int, lock bool) (index int, result int) { if len(a.array) == 0 { return -1, -2 } diff --git a/g/container/garray/garray_sorted_interface.go b/g/container/garray/garray_sorted_interface.go index b31646720..a63f021c3 100644 --- a/g/container/garray/garray_sorted_interface.go +++ b/g/container/garray/garray_sorted_interface.go @@ -117,13 +117,13 @@ func (a *SortedArray) Slice() []interface{} { // 查找指定数值的索引位置,返回索引位置(具体匹配位置或者最后对比位置)及查找结果 // 返回值: 最后比较位置, 比较结果 -func (a *SortedArray) Search(value interface{}) (int, int) { +func (a *SortedArray) Search(value interface{}) (index int, result int) { return a.binSearch(value, true) } // 查找指定数值的索引位置,返回索引位置(具体匹配位置或者最后对比位置)及查找结果 // 返回值: 最后比较位置, 比较结果 -func (a *SortedArray) binSearch(value interface{}, lock bool) (int, int) { +func (a *SortedArray) binSearch(value interface{}, lock bool)(index int, result int) { if len(a.array) == 0 { return -1, -2 } diff --git a/g/container/garray/garray_sorted_string.go b/g/container/garray/garray_sorted_string.go index 2d8a961eb..e14860ac0 100644 --- a/g/container/garray/garray_sorted_string.go +++ b/g/container/garray/garray_sorted_string.go @@ -120,11 +120,11 @@ func (a *SortedStringArray) Slice() []string { // 查找指定数值的索引位置,返回索引位置(具体匹配位置或者最后对比位置)及查找结果 // 返回值: 最后比较位置, 比较结果 -func (a *SortedStringArray) Search(value string) (int, int) { +func (a *SortedStringArray) Search(value string) (index int, result int) { return a.binSearch(value, true) } -func (a *SortedStringArray) binSearch(value string, lock bool) (int, int) { +func (a *SortedStringArray) binSearch(value string, lock bool) (index int, result int) { if len(a.array) == 0 { return -1, -2 }