TestFile_WriteTo.golden 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ; Package name
  2. NAME = ini
  3. ; Package version
  4. VERSION = v1
  5. ; Package import path
  6. IMPORT_PATH = gopkg.in/%(NAME)s.%(VERSION)s
  7. ; Information about package author
  8. # Bio can be written in multiple lines.
  9. [author]
  10. ; This is author name
  11. NAME = Unknwon
  12. E-MAIL = u@gogs.io
  13. GITHUB = https://github.com/%(NAME)s
  14. # Succeeding comment
  15. BIO = """Gopher.
  16. Coding addict.
  17. Good man.
  18. """
  19. [package]
  20. CLONE_URL = https://%(IMPORT_PATH)s
  21. [package.sub]
  22. UNUSED_KEY = should be deleted
  23. [features]
  24. - = Support read/write comments of keys and sections
  25. - = Support auto-increment of key names
  26. - = Support load multiple files to overwrite key values
  27. [types]
  28. STRING = str
  29. BOOL = true
  30. BOOL_FALSE = false
  31. FLOAT64 = 1.25
  32. INT = 10
  33. TIME = 2015-01-01T20:17:05Z
  34. DURATION = 2h45m
  35. UINT = 3
  36. HEX_NUMBER = 0x3000
  37. [array]
  38. STRINGS = en, zh, de
  39. FLOAT64S = 1.1, 2.2, 3.3
  40. INTS = 1, 2, 3
  41. UINTS = 1, 2, 3
  42. TIMES = 2015-01-01T20:17:05Z,2015-01-01T20:17:05Z,2015-01-01T20:17:05Z
  43. BOOLS = true, false, false
  44. [note]
  45. empty_lines = next line is empty
  46. boolean_key
  47. more = notes
  48. ; Comment before the section
  49. ; This is a comment for the section too
  50. [comments]
  51. ; Comment before key
  52. key = value
  53. ; This is a comment for key2
  54. key2 = value2
  55. key3 = "one", "two", "three"
  56. [string escapes]
  57. key1 = value1, value2, value3
  58. key2 = value1\, value2
  59. key3 = val\ue1, value2
  60. key4 = value1\\, value\\\\2
  61. key5 = value1\,, value2
  62. key6 = aaa bbb\ and\ space ccc
  63. [advance]
  64. value with quotes = some value
  65. value quote2 again = some value
  66. includes comment sign = `my#password`
  67. includes comment sign2 = `my;password`
  68. true = 2+3=5
  69. `1+1=2` = true
  70. `6+1=7` = true
  71. """`5+5`""" = 10
  72. `"6+6"` = 12
  73. `7-2=4` = false
  74. ADDRESS = """404 road,
  75. NotFound, State, 50000"""
  76. two_lines = how about continuation lines?
  77. lots_of_lines = 1 2 3 4