hexdigest / gowrap

GoWrap is a command line tool for generating decorators for Go interfaces
MIT License
1.09k stars 82 forks source link

Add support for build tags #73

Open geekofalltrades opened 1 year ago

geekofalltrades commented 1 year ago

When attempting to generate from a file with a build tag, gowrap exits with an error.

//go:build unit

package main

//go:generate gowrap gen -g -p . -i TestInterface -t prometheus -o prom.go

type TestInterface interface{
    TestMethod()
}
go generate -tags unit ./...
failed to load source package: -: build constraints exclude all Go files in /path/to/package
path/to/package/prom_test.go:5: running "gowrap": exit status 1
hexdigest commented 1 year ago

This is a good one. Let me think what I can do.