mirror of
https://github.com/octoleo/restic.git
synced 2024-11-29 16:23:59 +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
|
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 {
|
func (a aclSID) getType() int {
|
||||||
return int(a >> 32)
|
return int(a >> 32)
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,6 @@ func runList(cmd *cobra.Command, opts GlobalOptions, args []string) error {
|
|||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
return nil
|
|
||||||
default:
|
default:
|
||||||
return errors.Fatal("invalid type")
|
return errors.Fatal("invalid type")
|
||||||
}
|
}
|
||||||
|
@ -51,12 +51,6 @@ func formatPercent(numerator uint64, denominator uint64) string {
|
|||||||
return fmt.Sprintf("%3.2f%%", percent)
|
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 {
|
func formatDuration(d time.Duration) string {
|
||||||
sec := uint64(d / time.Second)
|
sec := uint64(d / time.Second)
|
||||||
return formatSeconds(sec)
|
return formatSeconds(sec)
|
||||||
|
Loading…
Reference in New Issue
Block a user