github.com/gogf/gf@v1.16.9/.test/main.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"github.com/gogf/gf/v2/frame/g"
     7  	"github.com/gogf/gf/v2/os/gfile"
     8  	"github.com/gogf/gf/v2/text/gregex"
     9  )
    10  
    11  func main() {
    12  	fileContent := gfile.GetContents(`/Users/john/Workspace/Go/GOPATH/src/git.code.oa.com/Khaos/eros/app/khaos-oss/internal/logic/resource/resource_horizontal_downgrade.go`)
    13  	matches, err := gregex.MatchAllString(`func \(\w+ (.+?)\) ([\s\S]+?) {`, fileContent)
    14  	fmt.Println(err)
    15  	g.Dump(matches)
    16  }