mirror of
https://gitee.com/johng/gf.git
synced 2024-12-03 20:58:47 +08:00
28 lines
591 B
Go
28 lines
591 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
|
|
"github.com/gogf/gf/container/garray"
|
|
"github.com/gogf/gf/frame/g"
|
|
)
|
|
|
|
func main() {
|
|
array := garray.NewSortedStringArray()
|
|
array.Add("/api/ctl/show")
|
|
array.Add("/api/ctl/post")
|
|
array.Add("/api/obj/rest")
|
|
array.Add("/api/handler")
|
|
array.Add("/api/obj/delete")
|
|
array.Add("/api/obj/show")
|
|
array.Add("/api/obj/my-show")
|
|
array.Add("/api/*")
|
|
array.Add("/api/ctl/rest")
|
|
array.Add("/api/ctl/my-show")
|
|
g.Dump(array.Slice())
|
|
|
|
fmt.Println(strings.Compare("/api/ctl/post", "/api/*"))
|
|
fmt.Println(strings.Compare("/api/*", "/api/ctl/my-show"))
|
|
}
|