mirror of
https://github.com/octoleo/restic.git
synced 2024-12-02 01:48:30 +00:00
17 lines
225 B
Go
17 lines
225 B
Go
|
package restic
|
||
|
|
||
|
import "os/user"
|
||
|
|
||
|
func (sn *Snapshot) fillUserInfo() error {
|
||
|
usr, err := user.Current()
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
sn.Username = usr.Username
|
||
|
sn.UserID = usr.Uid
|
||
|
sn.GroupID = usr.Gid
|
||
|
|
||
|
return nil
|
||
|
}
|