change params order of Insert* functions for glist; improve gstr.IsNumber

This commit is contained in:
John
2019-10-01 16:35:44 +08:00
parent 6384e75ed9
commit e764b2393d
8 changed files with 140 additions and 14 deletions

View File

@ -0,0 +1,22 @@
package main
import (
"fmt"
"github.com/gogf/gf/container/glist"
)
func main() {
l := glist.New()
// Push
l.PushBack(1)
l.PushBack(2)
e0 := l.PushFront(0)
// Insert
l.InsertBefore(e0, -1)
l.InsertAfter(e0, "a")
fmt.Println(l)
// Pop
fmt.Println(l.PopFront())
fmt.Println(l.PopBack())
fmt.Println(l)
}