Skip to content

Commit

Permalink
vendor: replace github.com/pkg/browser with stubbed-out version
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Aug 25, 2022
1 parent 522573b commit 38ac4be
Show file tree
Hide file tree
Showing 16 changed files with 75 additions and 315 deletions.
3 changes: 3 additions & 0 deletions .nobrowser/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module nobrowser

go 1.18
31 changes: 31 additions & 0 deletions .nobrowser/nobrowser.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Package nobrowser stubs out github.com/pkg/browser
//
// See https://github.com/moby/buildkit/pull/3010#issuecomment-1226847222
package nobrowser

import (
"fmt"
"io"
)

// Stdout is the io.Writer to which executed commands write standard output.
var Stdout io.Writer

// Stderr is the io.Writer to which executed commands write standard error.
var Stderr io.Writer

// OpenFile opens new browser window for the file path.
func OpenFile(path string) error {
return fmt.Errorf("not implemented")
}

// OpenReader consumes the contents of r and presents the
// results in a new browser window.
func OpenReader(r io.Reader) error {
return fmt.Errorf("not implemented")
}

// OpenURL opens a new browser window pointing to url.
func OpenURL(url string) error {
return fmt.Errorf("not implemented")
}
9 changes: 7 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ require (
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/moby/sys/mount v0.3.0 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect; replaced: see below
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.12.2 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
Expand All @@ -149,4 +149,9 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible
replace (
github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220414164044-61404de7df1a+incompatible

// Stub-out pkg/browser, as we don't need it; see https://github.com/moby/buildkit/pull/3010#issuecomment-1226847222
github.com/pkg/browser => ./.nobrowser
)
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1126,8 +1126,6 @@ github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCko
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI=
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand Down
23 changes: 0 additions & 23 deletions vendor/github.com/pkg/browser/LICENSE

This file was deleted.

55 changes: 0 additions & 55 deletions vendor/github.com/pkg/browser/README.md

This file was deleted.

63 changes: 0 additions & 63 deletions vendor/github.com/pkg/browser/browser.go

This file was deleted.

9 changes: 0 additions & 9 deletions vendor/github.com/pkg/browser/browser_darwin.go

This file was deleted.

16 changes: 0 additions & 16 deletions vendor/github.com/pkg/browser/browser_freebsd.go

This file was deleted.

23 changes: 0 additions & 23 deletions vendor/github.com/pkg/browser/browser_linux.go

This file was deleted.

16 changes: 0 additions & 16 deletions vendor/github.com/pkg/browser/browser_openbsd.go

This file was deleted.

15 changes: 0 additions & 15 deletions vendor/github.com/pkg/browser/browser_unsupported.go

This file was deleted.

13 changes: 0 additions & 13 deletions vendor/github.com/pkg/browser/browser_windows.go

This file was deleted.

31 changes: 31 additions & 0 deletions vendor/github.com/pkg/browser/nobrowser.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 38ac4be

Please sign in to comment.