From 584fef1f2d222c02b86a08bc66a6d6e598c31b31 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 1 Apr 2022 21:00:12 +0200 Subject: In progress --- .gitignore | 1 + Makefile | 1 + go.mod | 5 +++++ src/p_options.go | 2 ++ 4 files changed, 9 insertions(+) create mode 100644 go.mod diff --git a/.gitignore b/.gitignore index be27aea..4eefffa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ #* +go.sum go2work diff --git a/Makefile b/Makefile index 15f22b5..309c397 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,7 @@ RMDIR = rmdir RM = rm -rf build: + go get github.com/BurntSushi/toml@latest go build -o ${TARGET} ${SRCS} clean: diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..4ef1506 --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module go2work + +go 1.18 + +require github.com/BurntSushi/toml v1.0.0 // indirect diff --git a/src/p_options.go b/src/p_options.go index ea8f9f5..ad35d24 100644 --- a/src/p_options.go +++ b/src/p_options.go @@ -48,6 +48,7 @@ package main import ( + "github.com/BurntSushi/toml" "log" "os" ) @@ -95,5 +96,6 @@ func find_options_file() string { func parse_toml_file(options_file string, def_options Options) Options { options := def_options + toml.DecodeFile(options_file, &options) return options } -- cgit v1.2.3