chore: Fix typos (#4285)

This commit is contained in:
Louis Ruch authored and GitHub committed 2024-01-25 09:43:40 -08:00
1 parent 6a55245394
commit fe6126438e
5 files changed
+8 -8

No files matched your search

+2 -2
View File
@@ -19,7 +19,7 @@ var keySubstMap = map[string]string{
"overridable": "Overridable",
}
func (c *Command) extraHelpFunc(helpMap map[string]func() string) string {
func (c *Command) extraHelpFunc(_ map[string]func() string) string {
var helpStr string
switch c.Func {
case "":
@@ -121,7 +121,7 @@ func (c *Command) printListTable(items []*policies.Policy) string {
return base.WrapForHelpText(output)
}
func printItemTable(item *policies.Policy, resp *api.Response) string {
func printItemTable(item *policies.Policy, _ *api.Response) string {
nonAttributeMap := map[string]any{}
if item.Id != "" {
nonAttributeMap["ID"] = item.Id
@@ -27,7 +27,7 @@ type extraStorageCmdVars struct {
flagDeleteAfter map[string]string
}
func (c *StorageCommand) extraStorageHelpFunc(helpMap map[string]func() string) string {
func (c *StorageCommand) extraStorageHelpFunc(_ map[string]func() string) string {
var helpStr string
switch c.Func {
case "create":
@@ -61,7 +61,7 @@ func extraStorageActionsFlagsMapFuncImpl() map[string][]string {
}
}
func extraStorageFlagsFuncImpl(c *StorageCommand, set *base.FlagSets, f *base.FlagSet) {
func extraStorageFlagsFuncImpl(c *StorageCommand, set *base.FlagSets, _ *base.FlagSet) {
fs := set.NewFlagSet("Storage Policy Options")
for _, name := range flagsStorageMap[c.Func] {
@@ -120,7 +120,7 @@ func (c *Command) printListTable(items []*sessionrecordings.SessionRecording) st
var retention string
switch item.RetainUntil {
case recording.InfinityTS:
retention = "Keep Forever"
retention = "Forever"
default:
retention = item.RetainUntil.Local().Format(time.RFC1123)
}
@@ -186,7 +186,7 @@ func printItemTable(item *sessionrecordings.SessionRecording, resp *api.Response
var retention string
switch item.RetainUntil {
case recording.InfinityTS:
retention = "Keep Forever"
retention = "Forever"
default:
retention = item.RetainUntil.Local().Format(time.RFC1123)
}
@@ -90,7 +90,7 @@ func (c *ReApplyStoragePolicyCommand) Run(args []string) int {
result, err := sClient.ReApplyStoragePolicy(c.Context, c.FlagId)
if err != nil {
if apiErr := api.AsServerError(err); apiErr != nil {
c.PrintApiError(apiErr, "Error from controller when reapplying strorage policy to session recording")
c.PrintApiError(apiErr, "Error from controller when reapplying storage policy to session recording")
return base.CommandApiError
}
c.PrintCliError(fmt.Errorf("Reappling storage policy error: %w", err))