diff --git a/.gitignore b/.gitignore index 55f3861..02ee172 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ /FFI-Platypus-Lang-Go-* /.build -/example/*.so -/example/*.h /blib/ diff --git a/example/Awesome-FFI/.gitignore b/examples/Awesome-FFI/.gitignore similarity index 100% rename from example/Awesome-FFI/.gitignore rename to examples/Awesome-FFI/.gitignore diff --git a/example/Awesome-FFI/Makefile.PL b/examples/Awesome-FFI/Makefile.PL similarity index 100% rename from example/Awesome-FFI/Makefile.PL rename to examples/Awesome-FFI/Makefile.PL diff --git a/example/Awesome-FFI/ffi/awesome.fbx b/examples/Awesome-FFI/ffi/awesome.fbx similarity index 100% rename from example/Awesome-FFI/ffi/awesome.fbx rename to examples/Awesome-FFI/ffi/awesome.fbx diff --git a/example/Awesome-FFI/ffi/go.mod b/examples/Awesome-FFI/ffi/go.mod similarity index 100% rename from example/Awesome-FFI/ffi/go.mod rename to examples/Awesome-FFI/ffi/go.mod diff --git a/example/Awesome-FFI/ffi/main.go b/examples/Awesome-FFI/ffi/main.go similarity index 100% rename from example/Awesome-FFI/ffi/main.go rename to examples/Awesome-FFI/ffi/main.go diff --git a/example/Awesome-FFI/ffi/main_test.go b/examples/Awesome-FFI/ffi/main_test.go similarity index 100% rename from example/Awesome-FFI/ffi/main_test.go rename to examples/Awesome-FFI/ffi/main_test.go diff --git a/example/Awesome-FFI/lib/Awesome/FFI.pm b/examples/Awesome-FFI/lib/Awesome/FFI.pm similarity index 100% rename from example/Awesome-FFI/lib/Awesome/FFI.pm rename to examples/Awesome-FFI/lib/Awesome/FFI.pm diff --git a/example/Awesome-FFI/t/awesome_ffi.t b/examples/Awesome-FFI/t/awesome_ffi.t similarity index 100% rename from example/Awesome-FFI/t/awesome_ffi.t rename to examples/Awesome-FFI/t/awesome_ffi.t diff --git a/example/GoHttpLib/.gitignore b/examples/GoHttpLib/.gitignore similarity index 100% rename from example/GoHttpLib/.gitignore rename to examples/GoHttpLib/.gitignore diff --git a/example/GoHttpLib/Makefile.PL b/examples/GoHttpLib/Makefile.PL similarity index 100% rename from example/GoHttpLib/Makefile.PL rename to examples/GoHttpLib/Makefile.PL diff --git a/example/GoHttpLib/ffi/LICENSE b/examples/GoHttpLib/ffi/LICENSE similarity index 100% rename from example/GoHttpLib/ffi/LICENSE rename to examples/GoHttpLib/ffi/LICENSE diff --git a/example/GoHttpLib/ffi/README b/examples/GoHttpLib/ffi/README similarity index 100% rename from example/GoHttpLib/ffi/README rename to examples/GoHttpLib/ffi/README diff --git a/example/GoHttpLib/ffi/README.md b/examples/GoHttpLib/ffi/README.md similarity index 100% rename from example/GoHttpLib/ffi/README.md rename to examples/GoHttpLib/ffi/README.md diff --git a/example/GoHttpLib/ffi/go.mod b/examples/GoHttpLib/ffi/go.mod similarity index 100% rename from example/GoHttpLib/ffi/go.mod rename to examples/GoHttpLib/ffi/go.mod diff --git a/example/GoHttpLib/ffi/gohttplib.c b/examples/GoHttpLib/ffi/gohttplib.c similarity index 100% rename from example/GoHttpLib/ffi/gohttplib.c rename to examples/GoHttpLib/ffi/gohttplib.c diff --git a/example/GoHttpLib/ffi/gohttplib.fbx b/examples/GoHttpLib/ffi/gohttplib.fbx similarity index 100% rename from example/GoHttpLib/ffi/gohttplib.fbx rename to examples/GoHttpLib/ffi/gohttplib.fbx diff --git a/example/GoHttpLib/ffi/gohttplib.go b/examples/GoHttpLib/ffi/gohttplib.go similarity index 100% rename from example/GoHttpLib/ffi/gohttplib.go rename to examples/GoHttpLib/ffi/gohttplib.go diff --git a/example/GoHttpLib/ffi/ptrproxy.go b/examples/GoHttpLib/ffi/ptrproxy.go similarity index 100% rename from example/GoHttpLib/ffi/ptrproxy.go rename to examples/GoHttpLib/ffi/ptrproxy.go diff --git a/example/GoHttpLib/ffi/responsewriter.go b/examples/GoHttpLib/ffi/responsewriter.go similarity index 100% rename from example/GoHttpLib/ffi/responsewriter.go rename to examples/GoHttpLib/ffi/responsewriter.go diff --git a/example/GoHttpLib/lib/GoHttpLib.pm b/examples/GoHttpLib/lib/GoHttpLib.pm similarity index 100% rename from example/GoHttpLib/lib/GoHttpLib.pm rename to examples/GoHttpLib/lib/GoHttpLib.pm diff --git a/example/GoHttpLib/t/gohttplib.t b/examples/GoHttpLib/t/gohttplib.t similarity index 100% rename from example/GoHttpLib/t/gohttplib.t rename to examples/GoHttpLib/t/gohttplib.t diff --git a/lib/FFI/Build/File/GoMod.pm b/lib/FFI/Build/File/GoMod.pm index accc330..96ec851 100644 --- a/lib/FFI/Build/File/GoMod.pm +++ b/lib/FFI/Build/File/GoMod.pm @@ -22,7 +22,10 @@ use File::chdir; =head1 DESCRIPTION -File class for Go Modules. +File class for Go Modules. This works like the other +L file types. For a complete example, +see the C directory that comes +with the L distribution. =cut diff --git a/maint/import-gohttplib b/maint/import-gohttplib index 4a012e8..52e2019 100755 --- a/maint/import-gohttplib +++ b/maint/import-gohttplib @@ -2,9 +2,9 @@ set -ex -rm -rf example/GoHttpLib/ffi example/GoHttpLib/plicease-gohttplib-* -mkdir -p example/GoHttpLib -cd example/GoHttpLib +rm -rf examples/GoHttpLib/ffi examples/GoHttpLib/plicease-gohttplib-* +mkdir -p examples/GoHttpLib +cd examples/GoHttpLib curl -L https://github.com/plicease/gohttplib/tarball/master | tar zxvf - mv plicease-gohttplib-* ffi cd ffi diff --git a/t/ffi_build_file_gomod.t b/t/ffi_build_file_gomod.t index 83d8219..1ed366d 100644 --- a/t/ffi_build_file_gomod.t +++ b/t/ffi_build_file_gomod.t @@ -5,9 +5,9 @@ use File::Glob qw( bsd_glob ); subtest 'basic' => sub { - foreach my $t (bsd_glob('example/Awesome-FFI/t/*.t')) + foreach my $t (bsd_glob('examples/Awesome-FFI/t/*.t')) { - my @command = ($^X, '-Iexample/Awesome-FFI/lib', $t); + my @command = ($^X, '-Iexamples/Awesome-FFI/lib', $t); my($out, $ret) = capture_merged { print "+@command"; system @command;