s/HasCommand/ContainsCommand/g
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-09-05 12:54:56 -05:00
parent 4a024e98f2
commit 579921a975
7 changed files with 9 additions and 9 deletions

View File

@@ -50,7 +50,7 @@ func BuildURI(rawuri, rawpath string) string {
return u.String()
}
func HasCommand(s, prefix, cmd string) bool {
func ContainsCommand(s, prefix, cmd string) bool {
s = strings.TrimSpace(s)
args := strings.Split(s, " ")

View File

@@ -2,7 +2,7 @@ package lib
import "testing"
func TestHasCommand(t *testing.T) {
func TestContainsCommand(t *testing.T) {
tables := []struct {
s string
prefix string
@@ -18,9 +18,9 @@ func TestHasCommand(t *testing.T) {
}
for _, table := range tables {
r := HasCommand(table.s, table.prefix, table.cmd)
r := ContainsCommand(table.s, table.prefix, table.cmd)
if r != table.r {
t.Errorf("HasCommand(%q, %q, %q), got: %t, want: %t",
t.Errorf("ContainsCommand(%q, %q, %q), got: %t, want: %t",
table.s, table.prefix, table.cmd, r, table.r,
)
}