Skip to content

Commit

Permalink
fix(examples): extension filter method (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
eremid authored Jan 20, 2023
1 parent d673738 commit 3297c88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"log"
"os"
"os/exec"
"path/filepath"
"strings"
"text/template"

Expand Down Expand Up @@ -149,8 +150,7 @@ func GenerateExamplesList(c config.Provider) tea.Msg {
}

// get only yaml files
if sf.Name()[len(sf.Name())-4:] != "yaml" &&
sf.Name()[len(sf.Name())-3:] != "yml" {
if filepath.Ext(sf.Name()) != ".yaml" && filepath.Ext(sf.Name()) != ".yml" {
continue
}

Expand Down

0 comments on commit 3297c88

Please sign in to comment.