Skip to content

Commit e49f25b

Browse files
vrischmannAdamSLevy
authored andcommitted
document the workaround for go mod vendor
1 parent 33bcb2e commit e49f25b

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

c/dummy.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
// +build dummy
22

3+
// Package c contains only a C file.
4+
//
5+
// This Go file is part of a workaround for `go mod vendor`.
6+
// Please see the file dummy.go at the root of the module for more information.
37
package c

dummy.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
// +build dummy
22

3+
// This file is part of a workaround for `go mod vendor` which won't vendor
4+
// C files if there's no Go file in the same directory.
5+
// This would prevent the c/sqlite3.c file to be vendored.
6+
//
7+
// This Go file imports the c directory where there is another dummy.go file which
8+
// is the second part of this workaround.
9+
//
10+
// These two files combined make it so `go mod vendor` behaves correctly.
11+
//
12+
// See this issue for reference: https://github.com/golang/go/issues/26366
13+
314
package sqlite
415

516
import (

0 commit comments

Comments
 (0)