Skip to content

Instantly share code, notes, and snippets.

@carnott-snap
Last active April 30, 2021 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carnott-snap/c2a4204c76b6ee2956c0f3c855e593d4 to your computer and use it in GitHub Desktop.
Save carnott-snap/c2a4204c76b6ee2956c0f3c855e593d4 to your computer and use it in GitHub Desktop.
module gist.github.com/c2a4204c76b6ee2956c0f3c855e593d4.git
go 1.16
require (
gist.github.com/ac489642a42c01530c15516160048aea.git v1.0.0
golang.org/x/exp v0.0.0-20210220032938-85be41e4509f
)
dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
gist.github.com/ac489642a42c01530c15516160048aea.git v1.0.0 h1:0EXzcsb7ihrV1jDnzDKEgj5XmJlwXyDJnrD/po0FQGI=
gist.github.com/ac489642a42c01530c15516160048aea.git v1.0.0/go.mod h1:MNMs8Swr2Eo9fA2V8wDNx9OkTX+rhGMp/r4pTKsJGAU=
gist.github.com/c2a4204c76b6ee2956c0f3c855e593d4.git v1.0.0/go.mod h1:CT8xlgZajrlyIM6xczy7Ds7xJle49hqZf2+ECgSZ3Uw=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4=
golang.org/x/exp v0.0.0-20210220032938-85be41e4509f h1:GrkO5AtFUU9U/1f5ctbIBXtBGeSJbWwIYfIsTcFMaX4=
golang.org/x/exp v0.0.0-20210220032938-85be41e4509f/go.mod h1:I6l2HNBLBZEcrOoCpyKLdY2lHoRZ8lI4x60KMCQDft4=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4=
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449 h1:xUIPaMhvROX9dhPvRCenIJtU78+lbEenGbgqB5hfHCQ=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa h1:5E4dL8+NgFOgjwbTKz+OOEGGhP+ectTmF842l6KjupQ=
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
package c2a4204c76b6ee2956c0f3c855e593d4
const Empty = ""
package c2a4204c76b6ee2956c0f3c855e593d4
import (
"context"
"os/exec"
"testing"
)
func TestEmpty(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
if b, err := exec.CommandContext(ctx, "go", "run", "golang.org/x/exp/cmd/gorelease").Output(); err != nil {
t.Error(string(b))
}
}
package c2a4204c76b6ee2956c0f3c855e593d4_test
import (
"testing"
"gist.github.com/ac489642a42c01530c15516160048aea.git"
"gist.github.com/c2a4204c76b6ee2956c0f3c855e593d4.git"
)
func TestEmpty(t *testing.T) {
if c2a4204c76b6ee2956c0f3c855e593d4.Empty != ac489642a42c01530c15516160048aea.Empty {
t.Error("want " + c2a4204c76b6ee2956c0f3c855e593d4.Empty + ", got " + ac489642a42c01530c15516160048aea.Empty)
}
}
// +build tools
package c2a4204c76b6ee2956c0f3c855e593d4
import _ "golang.org/x/exp/cmd/gorelease"
@carnott-snap
Copy link
Author

carnott-snap commented Mar 2, 2021

[user@localhost c2a4204c76b6ee2956c0f3c855e593d4]$ go mod tidy
[user@localhost c2a4204c76b6ee2956c0f3c855e593d4]$ go test .
--- FAIL: TestEmpty (0.74s)
    lib_test.go:13: Inferred base version: v1.0.0
        go.mod: the following requirements are needed
                gist.github.com/c2a4204c76b6ee2956c0f3c855e593d4.git@v1.0.0
        Run 'go mod tidy' to add missing requirements.
        
FAIL
FAIL    gist.github.com/c2a4204c76b6ee2956c0f3c855e593d4.git    0.744s
FAIL

@jeanbza
Copy link

jeanbza commented Apr 30, 2021

Note for future: run this example quickly with,

cd $(mktemp -d)
go mod init gist.github.com/ac489642a42c01530c15516160048aea.git
printf "package pkg\nimport \"gist.github.com/c2a4204c76b6ee2956c0f3c855e593d4.git\"\nconst Empty = c2a4204c76b6ee2956c0f3c855e593d4.Empty" > foo.go
go mod tidy
gorelease

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment