linuxのsysctl.confと同じ文法の任意のファイルをロードし、辞書型・Map等に格納するプログラムを作成してください。

https://man7.org/linux/man-pages/man5/sysctl.conf.5.html

入力例1

endpoint = localhost:3000
debug = true
log.file = /var/log/console.log

入力例2

endpoint = localhost:3000
# debug = true
log.file = /var/log/console.log
log.name = default.log

格納した変数の中身の期待値

(※) わかりやすさのために出力例をJson形式で書いていますが、Json形式で出力する必要はありません。

入力例1の出力例

{
  "endpoint": "localhost:3000",
  "debug": "true",
  "log": {
    "file": "/var/log/console.log"
  }
}

入力例2の出力例

{
  "endpoint": "localhost:3000",
  "log": {
    "file": "/var/log/console.log",
    "name": "default.log",
  }
}