add support for ignoring comments in config

This commit is contained in:
2023-01-28 01:13:11 -08:00
parent 36260e2e09
commit 076f814d9a

View File

@@ -51,9 +51,14 @@ func LoadMRConfig() (MRConfig, error) {
length := -1
mode := "default"
for n, line := range lines {
line = strings.TrimSpace(line)
if line == "" {
continue
}
// ignore comments in mrconfig
if strings.HasPrefix(line, "#") {
continue
}
if line == "[DEFAULT]" {
mode = "default"
continue