summaryrefslogtreecommitdiff
path: root/2023/Go
diff options
context:
space:
mode:
Diffstat (limited to '2023/Go')
-rw-r--r--2023/Go/.gitignore2
-rw-r--r--2023/Go/README.md23
-rw-r--r--2023/Go/Taskfile.yml22
3 files changed, 36 insertions, 11 deletions
diff --git a/2023/Go/.gitignore b/2023/Go/.gitignore
index 494e767..9f4cb5b 100644
--- a/2023/Go/.gitignore
+++ b/2023/Go/.gitignore
@@ -14,6 +14,8 @@
# Dependency directories (remove the comment below to include it)
# vendor/
+out/
+
# Go workspace file
go.work
go.work.sum
diff --git a/2023/Go/README.md b/2023/Go/README.md
index 13e51cf..9cda93b 100644
--- a/2023/Go/README.md
+++ b/2023/Go/README.md
@@ -1,4 +1,21 @@
-# Advent of Code 2023
-[![Test](https://github.com/DJOLEARY/AoC_2023/actions/workflows/go.yml/badge.svg?event=push)](https://github.com/DJOLEARY/AoC_2023/actions/workflows/go.yml)
+# Go 2023
-Done with the aim of learning golang
+## Getting Started
+
+### How to Build
+
+```sh
+task build
+```
+
+### How to Run
+
+```sh
+task run
+```
+
+### How to Test
+
+```sh
+task test
+```
diff --git a/2023/Go/Taskfile.yml b/2023/Go/Taskfile.yml
index a89c4c3..a07c24c 100644
--- a/2023/Go/Taskfile.yml
+++ b/2023/Go/Taskfile.yml
@@ -1,17 +1,23 @@
# https://taskfile.dev
-version: '3'
-
+version: "3"
tasks:
-
default:
- desc: "Prints this message"
+ desc: Prints this message
cmds:
- cmd: task --list-all
-
+ build:
+ cmds:
+ - cmd: go build -o=out/Advent_of_Code_2023 main.go
+ run:
+ cmds:
+ - cmd: go run main.go {{.CLI_ARGS}}
+ test:
+ cmds:
+ - cmd: go test ./...
test:coverage:
desc: Runs tests and produce coverage report
cmds:
- - mkdir --parents out
- - go test -coverprofile=out/coverage.out ./...
- - go tool cover -html=out/coverage.out
+ - cmd: mkdir --parents out
+ - cmd: go test -coverprofile=out/coverage.out ./...
+ - cmd: go tool cover -html=out/coverage.out