version-1
This commit is contained in:
10
cmd/linux.sh
Normal file
10
cmd/linux.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
cd "$(dirname "$0")"
|
||||
go build -o ../bin/client main.go
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "编译成功!可执行文件位于: ../bin/client"
|
||||
else
|
||||
echo "编译失败!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
7
cmd/main.go
Normal file
7
cmd/main.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package main
|
||||
|
||||
import client "client/internal"
|
||||
|
||||
func main() {
|
||||
client.Star()
|
||||
}
|
||||
10
cmd/windows.bat
Normal file
10
cmd/windows.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
@echo off
|
||||
cd /d %~dp0
|
||||
go build -o ../bin/client.exe main.go
|
||||
if %errorlevel% equ 0 (
|
||||
echo 编译成功!可执行文件位于: ..\bin\client.exe
|
||||
) else (
|
||||
echo 编译失败!
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user