I've stumbled upon this piece of code and two variables & function declarations from it look weird as hell:
getenvironment := func(data []string, getkeyval func(item string) (key, val string)) map[string]string {...}
environment := getenvironment(os.Environ(), func(item string) (key, val string) {
I understand what the code does in general, but these two lines just freak me out. Is it even okay to write like this? How do these unnamed (func(item string)) and empty (getkeyval) functions work?