diff options
| author | Jeff Carr <[email protected]> | 2023-12-31 02:50:20 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-12-31 02:50:20 -0600 |
| commit | d2f0691744ff677a3d044cad72c1c35d32f85d92 (patch) | |
| tree | 17d7c6e9b5dd16bc76b8c9ad62bcd0c2045ad1cb /digitalocean/listKeys.go | |
| parent | 44730e1b91d0aa9d412032aebe2fc0c8367ddf13 (diff) | |
create takes a name. delete() droplet works
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'digitalocean/listKeys.go')
| -rw-r--r-- | digitalocean/listKeys.go | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/digitalocean/listKeys.go b/digitalocean/listKeys.go index 97c82bb..ecf243f 100644 --- a/digitalocean/listKeys.go +++ b/digitalocean/listKeys.go @@ -2,9 +2,7 @@ package digitalocean import ( "context" - "golang.org/x/oauth2" - "github.com/digitalocean/godo" "go.wit.com/log" @@ -22,16 +20,19 @@ func (d *DigitalOcean) ListSSHKeyID() error { return err } + d.sshKeys = keys + // Find the key by name. - for i, key := range keys { - log.Info("found ssh i =", i) - log.Info("found ssh key.Name =", key.Name) - log.Info("found ssh key.Fingerprint =", key.Fingerprint) - log.Info("found ssh key:", key) - // if key.Name == name { - // return key.Fingerprint, nil - // } + for _, key := range keys { + log.Info("found ssh", key.Name) + log.Verbose("found ssh key:", key) + } + /* + sshKeys := []godo.DropletCreateSSHKey{ + {ID: 22994569}, + {ID: 333}, } + */ // return fmt.Errorf("SSH Key not found") return nil |
