Skip to content

Commit

Permalink
Correcting misspelled words (#1349)
Browse files Browse the repository at this point in the history
* Correcting Misspelled Words
* grammar fixes
  • Loading branch information
moritamori authored May 10, 2021
1 parent c2e21bd commit 4590150
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cobra/cmd/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestGoldenInitCmd(t *testing.T) {
expectErr: true,
},
{
name: "returns error when passing an relative path for project",
name: "returns error when passing a relative path for project",

This comment has been minimized.

Copy link
@ryanendo

ryanendo May 28, 2021

type (
// Store implements the KVStore interface with tracing enabled.
// Operations are traced on each core KVStore call and written to the
// underlying io.writer.
//
// TODO: Should we use a buffered writer and implement Commit on
// Store?
Store struct {
parent types.KVStore
writer io.Writer
context types.TraceContext
}

// operation represents an IO operation
operation string

// traceOperation implements a traced KVStore operation
traceOperation struct {
	Operation operation              `json:"operation"`
	Key       string                 `json:"key"`
	Value     string                 `json:"value"`
	Metadata  map[string]interface{} `json:"metadata"`
}

)

args: []string{"github.com/spf13/testproject"},
pkgName: "github.com/spf13/testproject",
expectErr: true,
Expand Down
2 changes: 1 addition & 1 deletion completions.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi
if len(finalArgs) == 0 && !foundLocalNonPersistentFlag {
// We only complete sub-commands if:
// - there are no arguments on the command-line and
// - there are no local, non-peristent flag on the command-line or TraverseChildren is true
// - there are no local, non-persistent flags on the command-line or TraverseChildren is true
for _, subCmd := range finalCmd.Commands() {
if subCmd.IsAvailableCommand() || subCmd == finalCmd.helpCommand {
if strings.HasPrefix(subCmd.Name(), toComplete) {
Expand Down
4 changes: 2 additions & 2 deletions powershell_completions.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock {
# filter the result
$_.Name -like "$WordToComplete*"
# Join the flag back if we have a equal sign flag

This comment has been minimized.

Copy link
@ryanendo

ryanendo May 28, 2021

completions.go

# Join the flag back if we have an equal sign flag
if ( $IsEqualFlag ) {
__%[1]s_debug "Join the equal sign flag back to the completion value"
$_.Name = $Flag + "=" + $_.Name
Expand All @@ -178,7 +178,7 @@ Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock {
$Values | ForEach-Object {
# store temporay because switch will overwrite $_
# store temporary because switch will overwrite $_
$comp = $_
# PowerShell supports three different completion modes
Expand Down

0 comments on commit 4590150

Please sign in to comment.