mirror of
https://github.com/octoleo/restic.git
synced 2024-11-29 08:14:03 +00:00
Dead code removal
Found by running golangci-lint on the entire code base.
This commit is contained in:
parent
66d089e239
commit
d81a396944
@ -35,17 +35,6 @@ type aclElement struct {
|
||||
Perm uint16
|
||||
}
|
||||
|
||||
func (a *aclSID) setUID(uid uint32) {
|
||||
*a = aclSID(uid) | (aclUser << 32)
|
||||
}
|
||||
func (a *aclSID) setGID(gid uint32) {
|
||||
*a = aclSID(gid) | (aclGroup << 32)
|
||||
}
|
||||
|
||||
func (a *aclSID) setType(tp int) {
|
||||
*a = aclSID(tp) << 32
|
||||
}
|
||||
|
||||
func (a aclSID) getType() int {
|
||||
return int(a >> 32)
|
||||
}
|
||||
|
@ -71,7 +71,6 @@ func runList(cmd *cobra.Command, opts GlobalOptions, args []string) error {
|
||||
return nil
|
||||
})
|
||||
|
||||
return nil
|
||||
default:
|
||||
return errors.Fatal("invalid type")
|
||||
}
|
||||
|
@ -51,12 +51,6 @@ func formatPercent(numerator uint64, denominator uint64) string {
|
||||
return fmt.Sprintf("%3.2f%%", percent)
|
||||
}
|
||||
|
||||
func formatRate(bytes uint64, duration time.Duration) string {
|
||||
sec := float64(duration) / float64(time.Second)
|
||||
rate := float64(bytes) / sec / (1 << 20)
|
||||
return fmt.Sprintf("%.2fMiB/s", rate)
|
||||
}
|
||||
|
||||
func formatDuration(d time.Duration) string {
|
||||
sec := uint64(d / time.Second)
|
||||
return formatSeconds(sec)
|
||||
|
Loading…
Reference in New Issue
Block a user