Skip to content

Commit

Permalink
换分词工具以兼容交叉编译
Browse files Browse the repository at this point in the history
  • Loading branch information
newpanjing committed Apr 19, 2022
1 parent 8205fcf commit 64bd7b4
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,12 @@ import (
"github.com/gin-gonic/gin"
"gofound/router/api"
"gofound/searcher"
"gofound/searcher/arrays"
"log"
"os"
)

func main() {

args := os.Args
if arrays.ExistsString(args, "--version") {
file, err := os.Open("version.txt")
if err != nil {
log.Fatal(err)
}
fp, _ := file.Stat()
buffer := make([]byte, fp.Size())
_, err = file.Read(buffer)
if err != nil {
log.Fatal(err)
return
}
fmt.Println("GoFound version:", string(buffer))
fmt.Println("Open Source: https://github.com/newpanjing/gofound")
os.Exit(0)
}

var addr string
flag.StringVar(&addr, "addr", "127.0.0.1:5678", "设置监听地址和端口")

Expand Down

0 comments on commit 64bd7b4

Please sign in to comment.