$23 GRAYBYTE WORDPRESS FILE MANAGER $31

SERVER : in-mum-web1330.main-hosting.eu #1 SMP Mon Feb 10 22:45:17 UTC 2025
SERVER IP : 88.222.243.220 | ADMIN IP 216.73.216.215
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/go/pkg/mod/github.com/mailru/easyjson@v0.7.7/parser/

HOME
Current File : /opt/go/pkg/mod/github.com/mailru/easyjson@v0.7.7/parser//pkgpath_test.go
package parser

import "testing"

func Test_getModulePath(t *testing.T) {
	tests := map[string]struct {
		goModPath string
		want      string
	}{
		"valid go.mod without comments and deps": {
			goModPath: "./testdata/default.go.mod",
			want:      "example.com/user/project",
		},
		"valid go.mod with comments and without deps": {
			goModPath: "./testdata/comments.go.mod",
			want:      "example.com/user/project",
		},
		"valid go.mod with comments and deps": {
			goModPath: "./testdata/comments_deps.go.mod",
			want:      "example.com/user/project",
		},
		"actual easyjson go.mod": {
			goModPath: "../go.mod",
			want:      "github.com/mailru/easyjson",
		},
		"invalid go.mod with missing module": {
			goModPath: "./testdata/missing_module.go",
			want:      "",
		},
	}
	for name := range tests {
		tt := tests[name]
		t.Run(name, func(t *testing.T) {
			if got := getModulePath(tt.goModPath); got != tt.want {
				t.Errorf("getModulePath() = %v, want %v", got, tt.want)
			}
		})
	}
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
25 Jan 2024 4.43 PM
root / root
0555
testdata
--
25 Jan 2024 4.43 PM
root / root
0555
modulepath.go
2.657 KB
25 Jan 2024 4.43 PM
root / root
0444
parser.go
2.408 KB
25 Jan 2024 4.43 PM
root / root
0444
pkgpath.go
2.959 KB
25 Jan 2024 4.43 PM
root / root
0444
pkgpath_test.go
0.976 KB
25 Jan 2024 4.43 PM
root / root
0444

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF