diff --git a/lua/dummy.go b/lua/dummy.go new file mode 100644 index 0000000..24ab284 --- /dev/null +++ b/lua/dummy.go @@ -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" +) diff --git a/lua/lua/dummy.go b/lua/lua/dummy.go new file mode 100644 index 0000000..651a797 --- /dev/null +++ b/lua/lua/dummy.go @@ -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