Skip to content

Commit cf3e388

Browse files
authored
Merge pull request #117 from tianon/i-hate-go-yes-i-do-i-hate-go-how-bout-u
Rename "Example" tests to satisfy Go 1.24's new vet rule
2 parents 41ddc6d + 6505490 commit cf3e388

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/gitfs/tarscrub_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
// this example is nice because it has some intentionally dangling symlinks in it that trip things up if they aren't implemented correctly!
1616
// (see also pkg/tarscrub/git_test.go)
17-
func ExampleGitVarnish() {
17+
func Example_gitVarnish() {
1818
repo, err := git.Clone(memory.NewStorage(), nil, &git.CloneOptions{
1919
URL: "https://github.com/varnish/docker-varnish.git",
2020
SingleBranch: true,
@@ -46,7 +46,7 @@ func ExampleGitVarnish() {
4646
// this example is nice because it has a different committer vs author timestamp
4747
// https://github.com/tianon/docker-bash/commit/eb7e541caccc813d297e77cf4068f89553256673
4848
// https://github.com/docker-library/official-images/blob/8718b8afb62ff1a001d99bb4f77d95fe352ba187/library/bash
49-
func ExampleGitBash() {
49+
func Example_gitBash() {
5050
repo, err := git.Clone(memory.NewStorage(), nil, &git.CloneOptions{
5151
URL: "https://github.com/tianon/docker-bash.git",
5252
SingleBranch: true,

pkg/tarscrub/git_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/go-git/go-git/v5/storage/memory"
1313
)
1414

15-
func ExampleGitHello() {
15+
func Example_gitHello() {
1616
repo, err := git.Clone(memory.NewStorage(), nil, &git.CloneOptions{
1717
URL: "https://github.com/docker-library/hello-world.git",
1818
SingleBranch: true,
@@ -43,7 +43,7 @@ func ExampleGitHello() {
4343

4444
// this example is nice because it has some intentionally dangling symlinks in it that trip things up if they aren't implemented correctly!
4545
// (see also pkg/gitfs/tarscrub_test.go)
46-
func ExampleGitVarnish() {
46+
func Example_gitVarnish() {
4747
repo, err := git.Clone(memory.NewStorage(), nil, &git.CloneOptions{
4848
URL: "https://github.com/varnish/docker-varnish.git",
4949
SingleBranch: true,

0 commit comments

Comments
 (0)