1
0
mirror of https://github.com/rclone/rclone.git synced 2025-11-23 21:44:49 +02:00

fs: fix option types printing incorrectly for backend flags

Before this change backend types were printing incorrectly as the name
of the type, not what was defined by the Type() method.

This was not working due to not calling the Type() method. However
this needed to be defined on a non-pointer type due to the way the
options are handled.
This commit is contained in:
Nick Craig-Wood
2023-09-27 13:58:27 +01:00
parent b8591b230d
commit 3553cc4a5f
15 changed files with 73 additions and 26 deletions

View File

@@ -11,8 +11,11 @@ import (
"github.com/stretchr/testify/require"
)
// Check it satisfies the interface
var _ flagger = (*Duration)(nil)
// Check it satisfies the interfaces
var (
_ flagger = (*Duration)(nil)
_ flaggerNP = Duration(0)
)
func TestParseDuration(t *testing.T) {
now := time.Date(2020, 9, 5, 8, 15, 5, 250, time.UTC)