commands: Fix spelling

This commit is contained in:
秦世成 2018-11-06 15:45:19 +08:00 committed by Bjørn Erik Pedersen
parent 2998fa0cd5
commit 47506d1644
2 changed files with 3 additions and 3 deletions

View file

@ -80,14 +80,14 @@ var _ commandsBuilderGetter = (*baseBuilderCmd)(nil)
// Used in tests. // Used in tests.
type commandsBuilderGetter interface { type commandsBuilderGetter interface {
getCmmandsBuilder() *commandsBuilder getCommandsBuilder() *commandsBuilder
} }
type baseBuilderCmd struct { type baseBuilderCmd struct {
*baseCmd *baseCmd
*commandsBuilder *commandsBuilder
} }
func (b *baseBuilderCmd) getCmmandsBuilder() *commandsBuilder { func (b *baseBuilderCmd) getCommandsBuilder() *commandsBuilder {
return b.commandsBuilder return b.commandsBuilder
} }

View file

@ -76,7 +76,7 @@ func TestCommandsPersistentFlags(t *testing.T) {
var sc *serverCmd var sc *serverCmd
for _, command := range commands { for _, command := range commands {
if b, ok := command.(commandsBuilderGetter); ok { if b, ok := command.(commandsBuilderGetter); ok {
v := b.getCmmandsBuilder().hugoBuilderCommon v := b.getCommandsBuilder().hugoBuilderCommon
assert.Equal("myconfig.toml", v.cfgFile) assert.Equal("myconfig.toml", v.cfgFile)
assert.Equal("mysource", v.source) assert.Equal("mysource", v.source)
assert.Equal("https://example.com/b/", v.baseURL) assert.Equal("https://example.com/b/", v.baseURL)