Skip to content

Commit dd2097d

Browse files
committed
GoFMT
1 parent c90e28b commit dd2097d

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

exec.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111

1212
var rPatt *regexp.Regexp
1313

14-
1514
func init() {
1615
rPatt = regexp.MustCompile(`[^\w@%+=:,./-]`)
1716
}
@@ -71,7 +70,9 @@ func Die(of int) {
7170
// Original: https://www.php.net/manual/en/function.escapeshellarg.php
7271
//
7372
func Escapeshellarg(s string) string {
74-
if len(s) == 0 {return "''"}
73+
if len(s) == 0 {
74+
return "''"
75+
}
7576

7677
if rPatt.MatchString(s) {
7778
return "'" + strings.ReplaceAll(s, "'", "'\"'\"'") + "'"
@@ -89,9 +90,9 @@ func Escapeshellcmd(s string) string {
8990

9091
z := make([]string, len(cmds))
9192

92-
for i ,s := range cmds {
93-
z[i] = Escapeshellarg(s)
94-
}
93+
for i, s := range cmds {
94+
z[i] = Escapeshellarg(s)
95+
}
9596

96-
return Join(" ",z)
97-
}
97+
return Join(" ", z)
98+
}

tests/Encryption/Base64Encode/Base64Encode_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ func CoverCheck(t *testing.T, s, exp string) {
1515
// TestBase64Encode - Test for Encryption
1616
func TestBase64Encode(t *testing.T) {
1717
want := "SGVsbG8gV29ybGQ="
18-
CoverCheck(t,phpfuncs.Base64Encode("Hello World"),want)
18+
CoverCheck(t, phpfuncs.Base64Encode("Hello World"), want)
1919
}

tests/Encryption/MD5/MD5_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ func CoverCheck(t *testing.T, s, exp string) {
1212
}
1313
}
1414

15-
1615
// TestMD5 - Test for Encryption
1716
func TestMD5(t *testing.T) {
1817
want := "b10a8db164e0754105b7a99be72e3fe5"
19-
CoverCheck(t,phpfuncs.MD5("Hello World"),want)
18+
CoverCheck(t, phpfuncs.MD5("Hello World"), want)
2019
}

tests/arrays/InArray_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ func CoverCheck(t *testing.T, s, exp bool) {
2020
func TestInArrayString(t *testing.T) {
2121
want := true
2222
stack := strings.Split(TestWords, " ")
23-
CoverCheck(t,phpfuncs.InArray(needle, stack),want)
23+
CoverCheck(t, phpfuncs.InArray(needle, stack), want)
2424
}
2525

2626
func TestInArrrayInt(t *testing.T) {
2727
want := true
2828
var needle = 2
2929
stack := [10]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}
30-
CoverCheck(t,phpfuncs.InArray(needle, stack),want)
30+
CoverCheck(t, phpfuncs.InArray(needle, stack), want)
3131
}

0 commit comments

Comments
 (0)