From d28efaf60df5989069227dc363f052289e8e123e Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 1 May 2023 19:51:50 +0200 Subject: [PATCH] Update build instructions --- BUILD.md | 16 ++++++++++------ src/ecodash/config.go | 2 ++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/BUILD.md b/BUILD.md index 6825bf0..b9d6e3f 100644 --- a/BUILD.md +++ b/BUILD.md @@ -11,16 +11,20 @@ If you really have to build it yourself, we recommend you Docker over binaries. 1. Download the Go Compiler from https://go.dev/dl/ or from your repository's package manager (it's usually called `go` or `golang`) 2. Download the Git SCM from https://git-scm.com/download/linux or from your package manager (it's always called `git`) -3. Clone the repository by running `git clone https://gitea.massivebox.net/ecodash/ecodash.git ` inside a command prompt -4. Switch to the project directory with `cd ecodash` -5. Build with `go build src/main/main.go -o ecodash`. This will generate an executable, `ecodash`, in the same directory. +3. Download `golangci-lint` from https://golangci-lint.run/ +4. Clone the repository by running `git clone https://gitea.massivebox.net/ecodash/ecodash.git ` inside a command prompt +5. Switch to the project directory with `cd ecodash` +6. Run `golangci-lint run` to lint all project files +7. Build with `go build src/main/main.go -o ecodash`. This will generate an executable, `ecodash`, in the same directory. ### Windows 1. Install the latest release of the Go Compiler for Windows from https://go.dev/dl/ 2. Install the Git SCM from https://git-scm.com/download/win. The "Standalone installer" is recommended. All the default settings will work fine. -3. Clone the repository by running `git clone https://gitea.massivebox.net/ecodash/ecodash.git ` inside a command prompt -4. Switch to the project directory with `cd ecodash` -5. Build with `go build src/main/main.go -o ecodash`. This will generate an executable, `ecodash.exe`, in the same directory. +3. Download `golangci-lint` from https://golangci-lint.run/ +4. Clone the repository by running `git clone https://gitea.massivebox.net/ecodash/ecodash.git ` inside a command prompt +5. Switch to the project directory with `cd ecodash` +6. Run `golangci-lint run` to lint all project files +7. Build with `go build src/main/main.go -o ecodash`. This will generate an executable, `ecodash.exe`, in the same directory. ## Docker \ No newline at end of file diff --git a/src/ecodash/config.go b/src/ecodash/config.go index 18f5cba..e9010f0 100644 --- a/src/ecodash/config.go +++ b/src/ecodash/config.go @@ -11,6 +11,8 @@ import ( "time" "github.com/gofiber/fiber/v2" + + // Needed to use sqlite3 databases _ "github.com/mattn/go-sqlite3" )