/cc @rasa - This is more idiomatic Go: to share the platform-independent stuff and make the platform-specific stuff unexported functions