Skip to content

Commit

Permalink
Return map literal
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuntao Lu committed Apr 19, 2017
1 parent b89448a commit c9a01d3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions codegen/module_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ func (generator *HTTPClientGenerator) Generate(
}

// Return the client files
files := map[string][]byte{}
files[clientFilePath] = client
files[structFilePath] = structs
return files, nil
return map[string][]byte{
clientFilePath: client,
structFilePath: structs,
}, nil
}

/*
Expand Down Expand Up @@ -268,11 +268,11 @@ func (generator *TCahnnelClientGenerator) Generate(
handlerFilePath := strings.TrimRight(clientFilePath, ".go") + "_handler.go"

// Return the client files
files := map[string][]byte{}
files[clientFilePath] = client
files[serverFilePath] = server
files[handlerFilePath] = handler
return files, nil
return map[string][]byte{
clientFilePath: client,
serverFilePath: server,
handlerFilePath: handler,
}, nil
}

func readClientConfig(rawConfig []byte) (*clientClassConfig, error) {
Expand Down

0 comments on commit c9a01d3

Please sign in to comment.