提交 5b032a74 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

support literal and interval field definition

上级 836b6195
......@@ -20,7 +20,7 @@ func GenerateByteItemsByStep(start byte, end byte, step int, repeat int) []inter
for round := 0; round < repeat; round++ {
for i := 0; true; {
val := start + byte(int(i)*step)
if val > end || i > repeat {
if val > end {
break
}
......
......@@ -155,7 +155,7 @@ func ParseRange(rang string) []string {
func ParseRangeItem(item string) (string, string, int) {
entry := ""
step := "1"
repeat := -1
repeat := 1
regx := regexp.MustCompile(`\{(.*)\}`)
arr := regx.FindStringSubmatch(item)
......
#!/usr/bin/env php
<?php
if (function_exists('simplexml_load_file')) {
if (!function_exists('simplexml_load_file')) {
print("simplexml_load_file missing, pls use 'sudo apt-get install php7.0-simplexml' to install\n");
}
\ No newline at end of file
......@@ -40,7 +40,7 @@ $content = file_get_contents('../test/output/output.sql');
$arr = explode("\n", $content);
print(">> $arr[0]\n");
if (function_exists('simplexml_load_file')) {
if (!function_exists('simplexml_load_file')) {
print("lib simplexml_load_file missing, pls use 'sudo apt-get install php7.0-simplexml' to install\n");
} else {
$output = [];
......
......@@ -10,7 +10,7 @@ CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -o build/zd-x86.exe src/zd.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o build/zd-amd64.exe src/zd.go
GO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o build/zd-linux src/zd.go
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o build/zd-mac src/zd.go
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -o build/zd-mac src/zd.go
cd build
......
go get -u github.com/jteeuwen/go-bindata/...
\ No newline at end of file
go get -u github.com/jteeuwen/go-bindata/...
scp build/zd-linux aaron@172.16.13.132:/home/aaron/dev/project/go/zendata/build
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册