switch to if

This commit is contained in:
Mark McGranaghan 2013-10-06 08:47:52 -07:00
parent 37028a7f0f
commit b0b6dbeb1b

View File

@ -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