util

package
v0.0.0-...-4e0165b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPassphrase

func GetPassphrase(passphrasePath string, prompt string) (string, error)

Get passphrase from two possible sources:

  1. Check whether a passphrase file is exist. If it exists, read and return the file content (whitespace-trimmed).
  2. If the file is not exist, then resort back to manual prompt.

It won't check the correctness of the passphrase itself.

func IsFileExists

func IsFileExists(path string) bool

func PromptPassphrase

func PromptPassphrase(prompt string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳