+
Skip to content
This repository was archived by the owner on Apr 24, 2018. It is now read-only.
This repository was archived by the owner on Apr 24, 2018. It is now read-only.

Parsing deploy config fails unless struct tags are modified #21

@sqs

Description

@sqs

If I create a _jekyll_s3.yml file as described, parseDeployConfig returns a DeployConfig struct with all zero values. But if I apply the following patch, it reads the values into the struct correctly.

diff --git a/config.go b/config.go
index 5d0bd43..6dd8b18 100644
--- a/config.go
+++ b/config.go
@@ -54,9 +55,9 @@ func parseConfig(data []byte) (Config, error) {
 // DeployConfig represents the key-value data in the _jekyll_s3.yml file
 // used for deploying a website to Amazon's S3.
 type DeployConfig struct {
-       Key    string `s3_id:""`
-       Secret string `s3_secret:""`
-       Bucket string `s3_bucket:""`
+       Key    string `s3_id`
+       Secret string `s3_secret`
+       Bucket string `s3_bucket`
 }

Are you using an old version of launchpad.net/goyaml, perhaps? (I just made sure I am on the latest version of goyaml.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载