Skip to content

Commit

Permalink
Renamed constructor argument to avoid collision with IIP term.
Browse files Browse the repository at this point in the history
  • Loading branch information
trustmaster committed Oct 11, 2013
1 parent 6ad111c commit edb0bf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ func Unregister(componentName string) bool {
}

// Factory creates a new instance of a component registered under a specific name.
func Factory(componentName string, initialPacket interface{}) interface{} {
func Factory(componentName string, constructorArgs interface{}) interface{} {
if constructor, exists := ComponentRegistry[componentName]; exists {
return constructor(initialPacket)
return constructor(constructorArgs)
} else {
panic("Uknown component name: " + componentName)
}
Expand Down

0 comments on commit edb0bf1

Please sign in to comment.