Right now we have a bunch of write functions for unit file Overwrite, Delete and Insert we don't have a Read function, so there is a bunch of u.Contents["Service"]["ExecStart"] to get to a value.
An Getter function would be nice here, maybe:
// Content returns the values set in section, under name. If not found nil is returned.
func (u *File) Content(section, name string) []string { .... }
Should be added in internal/unit/file.go and then all callers should be updated.
Right now we have a bunch of write functions for unit file
Overwrite,DeleteandInsertwe don't have a Read function, so there is a bunch ofu.Contents["Service"]["ExecStart"]to get to a value.An Getter function would be nice here, maybe:
Should be added in
internal/unit/file.goand then all callers should be updated.