FAQ
Hi,

There's nothing wrong with your code, except for the capitalization of the
fields in Parameters and Yaml structs :-)

The problem is your Parameters struct says:

type (
     Parameters struct {
         Keys map[string]string
     }

     Yaml struct {
         Parameters Parameters
     }
)

The 'real' problem is that your Yaml says:

parameters:
     database_driver: pdo_mysql
     database_host: database.local
     database_port: 3306
     database_name: test

Change your Yaml to:


parameters:
    keys:
      database_driver: pdo_mysql
      database_host: database.local
      database_port: 3306
      database_name: test

The map[string]string is the Keys value of the Parameters object, so you
need to reflect this in the Yaml as well, obviously.

All the best,
Craig

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 11 of 11 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedFeb 15, '15 at 7:07p
activeFeb 16, '15 at 4:06a
posts11
users6
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase