go test project for loading configs (as a seperate code file)
Find a file
2025-09-23 15:37:50 +02:00
.gitignore added gitignore 2025-09-21 22:53:45 +02:00
config.ini split read config up into lines. parsing is next 2025-09-22 00:03:11 +02:00
go.mod 2files1prog 2025-09-21 22:44:36 +02:00
loadconfig.go parsing the config into key and value with Cut() 2025-09-23 15:37:50 +02:00
main.go split read config up into lines. parsing is next 2025-09-22 00:03:11 +02:00
README.md added readme 2025-09-21 22:46:47 +02:00

test repo for 2 things:

  1. splitting up code into different files. Go makes this very easy, simply have them belong to the same package, and start any function you want to make available with a capital letter (such as LoadConfig() in this example).
  2. Load config from a file: the goal is to have a super simple file i can copypaste that lets me load a few config values form a file similar to INI format (current example just has key=value pairs),