重构目录结构

This commit is contained in:
chenxinquan 2022-11-16 21:52:33 +08:00
parent 099c858a31
commit 6ba36b51ad
44 changed files with 33 additions and 18 deletions

View File

@ -32,7 +32,8 @@ PRO_TOP_DIR = $(shell pwd)
BUILD_DIR = ${PRO_TOP_DIR}/build
SRC_BIN_DIR = ${PRO_TOP_DIR}/bin
SRC_DIR = ${PRO_TOP_DIR}/src
BIN_DIR = ${PRO_TOP_DIR}/bin
# TODO: make it can configurable
MAKE = make
@ -84,7 +85,7 @@ GENMAI_DIR= ${PRO_TOP_DIR}/genmai
genmai-build: pre-build
@echo ">"
go build -o ${BUILD_DIR}
cd ${SRC_DIR} && go build -o ${BUILD_DIR}
genmai-clean:
@echo ">"

14
logfile
View File

@ -2,3 +2,17 @@
2022/11/16 17:41:37 检测为liunx系统
2022/11/16 17:41:37 frameWork sure
2022/11/16 17:41:37 ssh connect succ
2022/11/16 18:05:23 检测为liunx系统
2022/11/16 18:05:23 frameWork sure
2022/11/16 21:27:32 检测为liunx系统
2022/11/16 21:27:32 frameWork sure
2022/11/16 21:27:49 检测为liunx系统
2022/11/16 21:27:49 frameWork sure
2022/11/16 21:28:02 检测为liunx系统
2022/11/16 21:28:02 frameWork sure
2022/11/16 21:37:56 检测为liunx系统
2022/11/16 21:37:56 frameWork sure
2022/11/16 21:41:19 检测为liunx系统
2022/11/16 21:41:19 frameWork sure
2022/11/16 21:48:49 检测为liunx系统
2022/11/16 21:48:49 frameWork sure

View File

@ -3,8 +3,8 @@ package ArgParser
import(
"flag"
"fmt"
"main/src/genmai/Pool"
"main/src/genmai/RemoteCheck"
"main/genmai/Pool"
"main/genmai/RemoteCheck"
"strings"
"strconv"
"log"

View File

@ -37,7 +37,7 @@ import (
// 是以main开头。
//
// go 有点拉
sandbox "main/src/genmai/Sandbox"
sandbox "main/genmai/Sandbox"
)
const (

View File

@ -34,7 +34,7 @@ import (
// 是以main开头。
//
// go 有点拉
sandbox "main/src/genmai/Sandbox"
sandbox "main/genmai/Sandbox"
)
type ExplorerConfigDBus struct {

View File

@ -39,13 +39,13 @@ import (
// 是以main开头。
//
// go 有点拉
sandbox "main/src/genmai/Sandbox"
sandbox "main/genmai/Sandbox"
// TODO:
// 应该写成相对路径因为genmai应该是编译成库所以包路径不
// 是以main开头。
//
// go 有点拉
inter "main/src/genmai/Interpreter"
inter "main/genmai/Interpreter"
)
var (

View File

@ -36,7 +36,7 @@ import (
// 是以main开头。
//
// go 有点拉
sandbox "main/src/genmai/Sandbox"
sandbox "main/genmai/Sandbox"
)
type ExplorerConfigSystem struct {

View File

@ -34,7 +34,7 @@ import (
// 是以main开头。
//
// go 有点拉
sandbox "main/src/genmai/Sandbox"
sandbox "main/genmai/Sandbox"
)
type ExplorerConfigWeb struct {

View File

@ -34,7 +34,7 @@ import (
// 是以main开头。
//
// go 有点拉
inter "main/src/genmai/Interpreter"
inter "main/genmai/Interpreter"
)
// 继承于Interpreter接口

View File

@ -40,7 +40,7 @@ import (
// 是以main开头。
//
// go 有点拉
inter "main/src/genmai/Interpreter"
inter "main/genmai/Interpreter"
)
// 继承与SandBoxBase接口

View File

View File

View File

View File

@ -2,14 +2,14 @@
package main
import (
"main/src/genmai/ArgParser"
"main/src/genmai/FrameWorkCheck"
"main/genmai/ArgParser"
"main/genmai/FrameWorkCheck"
"fmt"
"flag"
"log"
"strconv"
"strings"
genmai "main/src/genmai"
genmai "main/genmai"
)
type Vul struct{
ParserNum int //协程数
@ -88,7 +88,7 @@ func main(){
return
///////////////////////////////
// test "main/src/genmai"
// test "main/genmai"
genmai.Test()
// config := genmai.NewConfig()
fmt.Println(">>")

View File

View File

@ -68,7 +68,7 @@ func main() {
go getResult(done)
go allocate(numOfTasks)
go createWorkerPool(numOfWorkers)
// 必须在allocate()和getResult()之后创建工作池
必须在allocate()和getResult()之后创建工作池
<-done
endTime := time.Now()
diff := endTime.Sub(startTime)

View File

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 96 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 107 KiB

View File

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 96 KiB

View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB