1
0
mirror of https://github.com/getsops/sotp.git synced 2026-02-05 09:45:59 +01:00

Use sops helper that leverages keyservices

This commit is contained in:
Julien Vehent
2020-03-30 12:40:38 -04:00
parent 31a43e91da
commit f61c204d35
2 changed files with 2 additions and 7 deletions

View File

@@ -6,8 +6,7 @@ import (
"os"
"github.com/xlzd/gotp"
"go.mozilla.org/sops/decrypt"
"gopkg.in/yaml.v2"
"go.mozilla.org/sops/v3/decrypt"
)
type Config struct {
@@ -23,12 +22,8 @@ func main() {
fmt.Println("usage: sotp <account_name>")
os.Exit(1)
}
config, err := decrypt.File("test_config.yaml", "yaml")
if err != nil {
log.Fatal(err)
}
var cfg Config
err = yaml.Unmarshal(config, &cfg)
err := decrypt.YamlFile("config.yaml", &cfg)
if err != nil {
log.Fatal(err)
}