Skip to content

Commit 2b9f12f

Browse files
committed
Add informative message for command - tuf get/set-threshold
Signed-off-by: Radoslav Dimitrov <[email protected]>
1 parent 917a34c commit 2b9f12f

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,13 @@ should be distributed to clients for performing initial updates.
115115

116116
#### `tuf set-threshold <role> <threshold>`
117117

118-
Sets the `role` threshold, the required number of keys for signing, to
118+
Sets the `role` threshold (required number of keys for signing) to
119119
`threshold`.
120120

121+
#### `tuf get-threshold <role>`
122+
123+
Outputs the `role` threshold (required number of keys for signing).
124+
121125
#### Usage of environment variables
122126

123127
The `tuf` CLI supports receiving passphrases via environment variables in

cmd/tuf/get_threshold.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ func cmdGetThreshold(args *docopt.Args, repo *tuf.Repo) error {
2323
return err
2424
}
2525

26-
fmt.Println("Got", role, "threshold", threshold)
26+
fmt.Println("The threshold for", role, "role is", threshold)
2727
return nil
2828
}

cmd/tuf/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Commands:
4242
clean Remove all staged manifests
4343
root-keys Output a JSON serialized array of root keys to STDOUT
4444
set-threshold Sets the threshold for a role
45+
get-threshold Outputs the threshold for a role
4546
4647
See "tuf help <command>" for more information on a specific command
4748
`

cmd/tuf/set_threshold.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ func cmdSetThreshold(args *docopt.Args, repo *tuf.Repo) error {
2828
return err
2929
}
3030

31-
fmt.Println("Set ", role, "threshold to", threshold)
31+
fmt.Println("The treshold for", role, "role is", threshold)
3232
return nil
3333
}

0 commit comments

Comments
 (0)