switch to if
This commit is contained in:
parent
37028a7f0f
commit
b0b6dbeb1b
@ -230,10 +230,9 @@ func parseExamples() []*Example {
|
||||
example.Segs = make([][]*Seg, 0)
|
||||
sourcePaths := mustGlob("examples/" + exampleId + "/*")
|
||||
for _, sourcePath := range sourcePaths {
|
||||
switch strings.HasSuffix(sourcePath, ".hash") {
|
||||
case true:
|
||||
if strings.HasSuffix(sourcePath, ".hash") {
|
||||
example.GoCodeHash, example.UrlHash = parseHashFile(sourcePath)
|
||||
default:
|
||||
} else {
|
||||
sourceSegs, filecontents := parseAndRenderSegs(sourcePath)
|
||||
if filecontents != "" {
|
||||
example.GoCode = filecontents
|
||||
|
Loading…
x
Reference in New Issue
Block a user