重构目录结构

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 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 # TODO: make it can configurable
MAKE = make MAKE = make
@ -84,7 +85,7 @@ GENMAI_DIR= ${PRO_TOP_DIR}/genmai
genmai-build: pre-build genmai-build: pre-build
@echo ">" @echo ">"
go build -o ${BUILD_DIR} cd ${SRC_DIR} && go build -o ${BUILD_DIR}
genmai-clean: genmai-clean:
@echo ">" @echo ">"

14
logfile
View File

@ -2,3 +2,17 @@
2022/11/16 17:41:37 检测为liunx系统 2022/11/16 17:41:37 检测为liunx系统
2022/11/16 17:41:37 frameWork sure 2022/11/16 17:41:37 frameWork sure
2022/11/16 17:41:37 ssh connect succ 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( import(
"flag" "flag"
"fmt" "fmt"
"main/src/genmai/Pool" "main/genmai/Pool"
"main/src/genmai/RemoteCheck" "main/genmai/RemoteCheck"
"strings" "strings"
"strconv" "strconv"
"log" "log"
@ -164,4 +164,4 @@ func RemoteArgParser(SSHHost string,SSHUser string,SSHPassword string)(checkResu
} }
} }
return checkResult return checkResult
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

View File

View File

View File

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

View File

View File

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