Configuration file syntax and parsing for golang
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

33 lines
749 B

# Global stuff
global = "global value";
# Primary stuff
primary {
string = "primary string value";
string_with_quote = "some \"quoted\" str\\ing";
single = 'hello world';
single_with_quote = '\'hello\' "world"';
# Semicolons are optional
integer = 500
float = 80.80
negative = -50
boolean = true
not_true = FALSE
nothing = NULL
# Reference secondary._under (which hasn't been defined yet)
sec_ref = secondary._under;
# Primary-sub stuff
sub {
key = "primary sub key value";
include "./test_include.cfg";
}
}
secondary {
another = "secondary another value";
global_reference = global;
primary_sub_key = primary.sub.key;
another_again = .another; # References secondary.another
_under = 50;
}