Pushup compiles down to Go code in its own package that should be easy to import in other Go projects that would like to get the features Pushup provides. Right now the reality is it's a little messy to do that.
This is a tracking issue but I think there are 3 things necessary to make this a reality:
URL routing - right now Pushup assumes it is at the root of a URL path. This should be straightforward to deal with with http.ServeMux and http.StripPrefix, but there should be an API for it.
Setup code in main.go - in _runtime/cmd/main.go is code for importing from the build directory and running a Pushup app as a standard Go http server. This should be factored out into its own API.
More control over output & build dir - we haven't exercised the controls for specifying non-default output params. This includes the build directory location, as well as the ability to specify the name of the generated Go package (this is in fact not exposed yet).
Then I think we need an example project that demonstrates a Pushup app can be imported like a regular Go package/module.
Pushup compiles down to Go code in its own package that should be easy to import in other Go projects that would like to get the features Pushup provides. Right now the reality is it's a little messy to do that.
This is a tracking issue but I think there are 3 things necessary to make this a reality:
Then I think we need an example project that demonstrates a Pushup app can be imported like a regular Go package/module.