Skip to content

Commit

Permalink
nil check docs generation
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecutalo committed Jun 26, 2023
1 parent 486f9f0 commit 1c7ed8e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/_website/generator/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,15 @@ func getClutchComponentFromFile(path string) (*Component, bool) {
relPath := regexp.MustCompile(`^.*?(backend/.*?)$`).FindStringSubmatch(path)[1]
url := fmt.Sprintf("https://github.com/lyft/clutch/blob/main/%s", relPath)

t := regexp.MustCompile(`clutch\.(\w+)\.`).FindStringSubmatch(nameStr)[1]
t := regexp.MustCompile(`clutch\.(\w+)\.`).FindStringSubmatch(nameStr)
if len(t) == 0 {
return nil, false
}

component := &Component{
Name: nameStr,
URL: url,
Type: t,
Type: t[1],
ClutchDoc: cd,
}
return component, true
Expand Down

0 comments on commit 1c7ed8e

Please sign in to comment.