Skip to content

Commit

Permalink
Fix typo in build BuildMux.Add parameter
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Goff <[email protected]>
  • Loading branch information
cpuguy83 committed Apr 5, 2024
1 parent 8bd55e3 commit 07a1eb0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,19 @@ type handler struct {

// Add adds a handler for the given target
// [targetKey] is the resource path to be handled
func (m *BuildMux) Add(targePath string, bf gwclient.BuildFunc, info *bktargets.Target) {
func (m *BuildMux) Add(targetPath string, bf gwclient.BuildFunc, info *bktargets.Target) {
if m.handlers == nil {
m.handlers = make(map[string]handler)
}

h := handler{bf, info}
m.handlers[targePath] = h
m.handlers[targetPath] = h

if info != nil && info.Default {
m.defaultH = &h
}

bklog.G(context.TODO()).WithField("target", targePath).Info("Added handler to router")
bklog.G(context.TODO()).WithField("target", targetPath).Info("Added handler to router")
}

const keyTarget = "target"
Expand Down

0 comments on commit 07a1eb0

Please sign in to comment.