File Utilities in Go
Regarding testing:  Yes, it's in the standard library.  There are of course more libraries to help out more, but that's where you should likely start your journey.



For error reporting, well, it's a bit inconsistent at the moment?  There's both returning a value ([NOT CONTENT]...) as well as fmt.Println and panic too, all of which are not very appropriate for production usage.

The first of which can lead to serious debugging nightmares:  How do you know the file didn't contain that exact string for one?  This is always a problem if the valid values are mixed with error values (like how in most C APIs there are int return values with -1 for errors, while everything \$&gt;= 0\$ are the "actual" return values in the non-error case)!  It's much better to keep them separate, which in Go could be done with separate types, or separate return values (which is what's done for errors).

The second one is perhaps less bad, but again, the error situation is just hidden, not actually dealt with.

The third one can be done, however it's usually reserved for programming errors, since not catching a panic call will simply abort the program (which is rarely what you want).

If in doubt, return an error in addition to any values: func getContent(string) (string, error) and writeContent/appendContent(string, string) error would be fine.  Maybe also see this blog post and this newer one for 1.13.



The defer to close files is pretty much required in my opinion.  Unless you can prove that nothing else between the opening of the file and the Close call can raise a panic, you pretty much have to use defer ...Close(), otherwise you risk leaking resources (open file handles).

For the comments, please have a look here:  Instead of comments simply add proper docstrings to the functions, that is good practice anyway and would certainly be appreciated by colleagues on bigger projects.

Maybe as a last note:  The permissions 0777 and 0600 are okay if those are the ones you want.  However, that might not be true in general.  Exactly how ioutil.WriteFile lets you specify them would be likely what you want in general.  If not, consider creating constants so that you don't have magic numbers inline with the code (e.g. const defaultFilePermissions = 0777 or something similar).