Dead code removal

Found by running golangci-lint on the entire code base.
This commit is contained in:
greatroar 2020-08-04 08:38:57 +02:00
parent 66d089e239
commit d81a396944
3 changed files with 0 additions and 18 deletions

View File

@ -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)
}

View File

@ -71,7 +71,6 @@ func runList(cmd *cobra.Command, opts GlobalOptions, args []string) error {
return nil
})
return nil
default:
return errors.Fatal("invalid type")
}

View File

@ -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)