From addff0f3c11c9ce2e829a2845404312f46912c77 Mon Sep 17 00:00:00 2001 From: ppom <> Date: Fri, 5 May 2023 12:53:10 +0200 Subject: [PATCH] Standardize go project structure --- .gitignore | 1 + default.nix | 18 ++++++++++++++++++ daemon.go => reaction/main.go | 0 cli.go => reactionc/main.go | 0 4 files changed, 19 insertions(+) create mode 100644 default.nix rename daemon.go => reaction/main.go (100%) rename cli.go => reactionc/main.go (100%) diff --git a/.gitignore b/.gitignore index 4d6e003..4ee9af4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /reaction.db +/result diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..b40c8f7 --- /dev/null +++ b/default.nix @@ -0,0 +1,18 @@ +{ buildGoModule, fetchFromGitLab }: +let + pname = "reaction"; + version = "v0.1"; +in buildGoModule { + inherit pname version; + + src = ./.; + # src = fetchFromGitLab { + # domain = "framagit.org"; + # owner = "ppom"; + # repo = pname; + # rev = version; + # sha256 = "sha256-45ytTNZIbTIUOPBgAdD7o9hyWlJo//izUhGe53PcwNA="; + # }; + + vendorHash = "sha256-g+yaVIx4jxpAQ/+WrGKxhVeliYx7nLQe/zsGpxV4Fn4="; +} diff --git a/daemon.go b/reaction/main.go similarity index 100% rename from daemon.go rename to reaction/main.go diff --git a/cli.go b/reactionc/main.go similarity index 100% rename from cli.go rename to reactionc/main.go