Documentation ¶
Overview ¶
Package recon reconciles sceptre directories.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Fs afero.Fs
Fs is the filesystem. Setting this allows an in-memory filesystem for testing.
Functions ¶
func All ¶
func All(d string)
All checks.
Example ¶
package main import ( "github.com/spf13/afero" "gitlab.com/theherk/sceptre-recon/pkg/recon" ) func main() { fs := afero.NewMemMapFs() fs.MkdirAll("sceptre/templates", 0755) fs.MkdirAll("sceptre/config", 0755) recon.Fs = fs recon.All("sceptre") }
Output: sceptre: sceptre root found; checking
Example (MissingTemplate) ¶
package main import ( "github.com/spf13/afero" "gitlab.com/theherk/sceptre-recon/pkg/recon" ) func main() { fs := afero.NewMemMapFs() fs.MkdirAll("sceptre/templates", 0755) fs.MkdirAll("sceptre/config", 0755) afero.WriteFile(fs, "sceptre/config/cfgA.yaml", []byte("template_path: tmplA.yaml"), 0644) recon.Fs = fs recon.All("sceptre") }
Output: sceptre: sceptre root found; checking sceptre/config/cfgA.yaml: template missing; tmplA.yaml
Example (UnusedTemplate) ¶
package main import ( "github.com/spf13/afero" "gitlab.com/theherk/sceptre-recon/pkg/recon" ) func main() { fs := afero.NewMemMapFs() fs.MkdirAll("sceptre/templates", 0755) fs.MkdirAll("sceptre/config", 0755) afero.WriteFile(fs, "sceptre/templates/tmplA.yaml", []byte(""), 0644) recon.Fs = fs recon.All("sceptre") }
Output: sceptre: sceptre root found; checking sceptre/templates/tmplA.yaml: template exists, but is not used
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.