Working with comments

Take care that following format will be treated as comment:

  • Line begins with # or ;
  • Words after # or ;
  • Words after section name (i.e words after [some section name])
    If you want to save a value with # or ;, please quote them with ` or """.

Alternatively, you can use following LoadOptions to completely ignore inline comments:

  1. cfg, err := ini.LoadSources(ini.LoadOptions{
  2. IgnoreInlineComment: true,
  3. }, "app.ini")

原文: https://ini.unknwon.io/docs/howto/work_with_comments