胡德“config.json”的价值观

时间:2014-06-23 09:19:01

标签: postgresql go

我在hood的文档中遇到了一些问题,没有解释config.json中应该包含的内容。 我试过了:

{
  "development": {
    "driver": "postgres",
    "source": "my_development"
  }
}

但我有错误:

hood db:migrate
2014/06/23 12:53:14 applying migrations...
panic: missing "=" after "my_development" in connection info string"

1 个答案:

答案 0 :(得分:2)

来自hood文档:

  

驱动程序和源字段是您传递给sql.Open(2)函数的字符串。

因此driver值应为postgresql(对于您的示例),source值应为key=value列表或完整连接URI(如在postgresql documentation)中描述。

一些例子(来自here):

  • postgres://pqgotest:password@localhost/pqgotest?sslmode=verify-full
  • user=pqgotest dbname=pqgotest sslmode=verify-full
相关问题