Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vendoring of package using go mod vendor #80

Merged
merged 1 commit into from
Jul 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions lua/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// +build dummy

// This file is part of a workaround for `go mod vendor` which won't
// vendor C files if there are no Go files in the same directory.
// This prevents the C header files in lua/ from being vendored.
//
// This Go file imports the lua package where there is another
// dummy.go file which is the second part of this workaround.
//
// These two files combined make it so `go mod vendor` behaves correctly.
//
// See this issue for reference: https://github.com/golang/go/issues/26366

package lua

import (
_ "github.com/aarzilli/golua/lua/lua"
)
7 changes: 7 additions & 0 deletions lua/lua/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// +build dummy

// Package lua contains only a C header files.
//
// This Go file is part of a workaround for `go mod vendor`.
// Please see the file dummy.go in the parent directory for more information.
package lua