Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 951 Bytes

README.md

File metadata and controls

43 lines (30 loc) · 951 Bytes

docker-secrets

GoDoc Go Report

Requirements

Go 1.2 or above.

Installation

Run the following command to install the package:

go get github.com/ijustfool/docker-secrets

Usage

package main

import (
    "fmt"
    "github.com/ijustfool/docker-secrets"
)

func main() {
    dockerSecrets, _ := secrets.NewDockerSecrets("")

    // Get all secrets
    fmt.Println(dockerSecrets.GetAll())
    // print: map[secret_1:val_1 secret_2:val_2]

    // Get a single secret
    secret, _ := dockerSecrets.Get("secret_1")
    fmt.Println(secret)
    // print: val_1

    // Custom location
    dsCustomLoc, _ := secrets.NewDockerSecrets("/run/myCustomLocation")
}