Home

gomodinit @main - refs - log -
-
https://git.jolheiser.com/gomodinit.git
go mod init
tree log patch
clean up test Signed-off-by: jolheiser <git@jolheiser.com>
Signature
-----BEGIN SSH SIGNATURE----- U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgBTEvCQk6VqUAdN2RuH6bj1dNkY oOpbPWj+jw4ua1B1cAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5 AAAAQP4GI61MzF/RdKL19Sy8sI1077cH/SmOm9LCJdZelUaOPr8N2w/mO4T5ip17eE/xpk zRjSeyMVwiiaJGyNzurwk= -----END SSH SIGNATURE-----
jolheiser <git@jolheiser.com>
1 week ago
1 changed files, 2 additions(+), 8 deletions(-)
gomodinit_test.go
M gomodinit_test.go -> gomodinit_test.go
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
diff --git a/gomodinit_test.go b/gomodinit_test.go
index c62464d70c67a202a08333d6c858ffd237710c87..fda1be3aed58c932cf95451f23def0598e9aa86d 100644
--- a/gomodinit_test.go
+++ b/gomodinit_test.go
@@ -4,7 +4,6 @@ import (
 	"fmt"
 	"os"
 	"path/filepath"
-	"strings"
 	"testing"
 
 	"github.com/matryer/is"
@@ -32,7 +31,7 @@ 		},
 		{
 			Name:     "no_uri",
 			Path:     "giteacom/user3/repo",
-			Expected: "%s/giteacom/user3/repo",
+			Expected: fmt.Sprintf("%s/giteacom/user3/repo", tmp),
 		},
 		{
 			Name:          ".gomodinit",
@@ -65,12 +64,7 @@
 			name, err := module()
 			assert.NoErr(err) // Should get module name
 
-			expected := tc.Expected
-			if strings.Contains(expected, "%s") {
-				expected = fmt.Sprintf(expected, tmp)
-			}
-
-			assert.Equal(name, expected) // Module name should match expected name
+			assert.Equal(name, tc.Expected) // Module name should match expected name
 		})
 	}
 }