mirror of
https://github.com/FiloSottile/age.git
synced 2026-09-03 14:46:58 +00:00
internal/age: add some docs and polish API
This commit is contained in:
@@ -38,8 +38,8 @@ func main() {
|
||||
|
||||
if fi, err := out.Stat(); err == nil {
|
||||
if fi.Mode().IsRegular() && fi.Mode().Perm()&0004 != 0 {
|
||||
fmt.Fprintf(os.Stderr, "Warning: writing to a world-readable file.\n")
|
||||
fmt.Fprintf(os.Stderr, "Consider setting the umask to 066 and trying again.\n")
|
||||
fmt.Fprintf(os.Stderr, "Warning: writing to a world-readable file.\n"+
|
||||
"Consider setting the umask to 066 and trying again.\n")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ func sshFingerprint(pk ssh.PublicKey) string {
|
||||
return format.EncodeToString(h[:4])
|
||||
}
|
||||
|
||||
func (i *EncryptedSSHIdentity) Matches(block *format.Recipient) error {
|
||||
func (i *EncryptedSSHIdentity) Match(block *format.Recipient) error {
|
||||
if block.Type != i.Type() {
|
||||
return age.ErrIncorrectIdentity
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user