From 25c76aebf2b551a712524e2470bacab157628acb Mon Sep 17 00:00:00 2001 From: loveuer Date: Sun, 27 Apr 2025 16:38:51 +0800 Subject: [PATCH] init: 0.0.4 --- .gitignore | 5 + go.mod | 3 + internal/api/api.go | 7 ++ main.go | 17 +++ page/home.html | 247 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 279 insertions(+) create mode 100644 .gitignore create mode 100644 go.mod create mode 100644 internal/api/api.go create mode 100644 main.go create mode 100644 page/home.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fa7b149 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.idea +.vscode +.DS_Store +dist +xtest \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..88b6b69 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/loveuer/ushare + +go 1.24.2 diff --git a/internal/api/api.go b/internal/api/api.go new file mode 100644 index 0000000..c05bf4c --- /dev/null +++ b/internal/api/api.go @@ -0,0 +1,7 @@ +package api + +import "context" + +func Start(ctx context.Context) { + // TODO: implement API server start logic +} diff --git a/main.go b/main.go new file mode 100644 index 0000000..1e89d66 --- /dev/null +++ b/main.go @@ -0,0 +1,17 @@ +package main + +import ( + "context" + "github.com/loveuer/ushare/internal/api" + "os/signal" + "syscall" +) + +func main() { + ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) + defer cancel() + + api.Start(ctx) + + <-ctx.Done() +} diff --git a/page/home.html b/page/home.html new file mode 100644 index 0000000..2260c51 --- /dev/null +++ b/page/home.html @@ -0,0 +1,247 @@ + + + + + + UShare + + + +
+
+

上传文件

+ + +
+
+
+ +
+
+
+
+ +
+
+

下载文件

+ + +
+
+ + + + \ No newline at end of file