ReadStringPasswordFromFile reads and returns the password from the given filename. The contents of the file will be trimmed at the right.
(filename string)
| 64 | // ReadStringPasswordFromFile reads and returns the password from the given filename. |
| 65 | // The contents of the file will be trimmed at the right. |
| 66 | func ReadStringPasswordFromFile(filename string) (string, error) { |
| 67 | b, err := ReadPasswordFromFile(filename) |
| 68 | if err != nil { |
| 69 | return "", err |
| 70 | } |
| 71 | return string(b), nil |
| 72 | } |
| 73 | |
| 74 | // ReadInput from stdin if something is detected or ask the user for an input |
| 75 | // using the given prompt. |
searching dependent graphs…