v0.3.0
What's Changed
Improvement of session variables
Now all types (existing and new ones) allows an injection of value of type vars.Variables
to allow tracking and use of variables during a gexe
session. The following shows an example of process being launched with variables:
variables := vars.New().SetVar("proc", "echo")
exec.RunProcWithVars(`$proc "Hello World!"`, variables)
In the majority of cases, you will start the API chain from the gexe
package which has a default instance of vars.Variables
ready to use as shown below:
gexe.SetVar("proc", "echo")
gexe.Run(`$proc "Hello World!")
Extending the fs
package
The fs
package has been extended to introduce types and methods to work with OS directory paths. In addition to working with files, the new fs.Path
allows the followings:
- Query path information
- Creation of directory at a specified path point
- Removal of resources at specified path
Improvements to package http
In this release, package http
has been updated to use an API similar to that of fs (for file reading/writing). Using the new API makes it easy to retrieve resources from an HTTP server and output it in different types including string, bytes, io.Reader, etc. The same changes has been done to write data to a remote web server.
Example:
gexe.FileWrite("/tmp/eapv2.txt").String(gexe.GetUrl(`https://remote/file`).String())
PR list
- See PR General improvements for project by @vladimirvivien in #51
- Update project documentation by @vladimirvivien in #52
Full Changelog: v0.2.0...v0.3.0