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:
9
main.go
9
main.go
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user