From 1e1bfa15e9a1f0cd063b00abb992a24ef94a0e9f Mon Sep 17 00:00:00 2001 From: Quinn Slack Date: Sun, 20 Dec 2015 21:48:52 -0800 Subject: [PATCH] allow specifying multiple netrc machine auth entries --- plugin/types.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugin/types.go b/plugin/types.go index fa40b23..e06f259 100644 --- a/plugin/types.go +++ b/plugin/types.go @@ -35,8 +35,8 @@ type Workspace struct { Root string `json:"root"` Path string `json:"path"` - Netrc *Netrc `json:"netrc"` - Keys *Keypair `json:"keys"` + Netrc []*NetrcEntry `json:"netrc"` + Keys *Keypair `json:"keys"` } // Keypair represents an RSA public and private key assigned to a @@ -47,10 +47,10 @@ type Keypair struct { Private string `json:"private"` } -// Netrc defines a default .netrc file that should be injected -// into the build environment. It will be used to authorize access -// to https resources, such as git+https clones. -type Netrc struct { +// NetrcEntry defines a "machine" entry in a .netrc file that should +// be injected into the build environment. It will be used to +// authorize access to https resources, such as git+https clones. +type NetrcEntry struct { Machine string `json:"machine"` Login string `json:"login"` Password string `json:"user"`