Features
when you save golang files(main.go
), copy and transform main.go
to main_err4.go
,
the main.go
must include build tag err4
, if the file don't include, it will don't copy and transform to main_err4.go
//go:build err4
package main
import "errors"
func main() {
var qTerr error
var qTerr2 error
_, _ = qTerr, qTerr2
qTerr = errors.New("e")
var e1, e2 error
_, qTerr, qTerr2 = 7, e1, e2
}
-->
main_err4.go
//go:build !err4
// Code generated by github.com/shynome/err4 DO NOT EDIT
package main
import (
"errors"
"github.com/shynome/err4"
)
func main() {
var qTerr error
var qTerr2 error
_, _ = qTerr, qTerr2
_ = err4.Check(errors.New("e"))(&qTerr)
if qTerr != nil {
return
}
var e1, e2 error
_, _, _ = err4.Check2(7, e1, e2)(nil, &qTerr, &qTerr2)
if qTerr != nil {
return
}
if qTerr2 != nil {
return
}
}
Requirements
Extension Settings
add build tags err4
{
"go.buildTags": "err4"
}
Known Issues
Release Notes
Users appreciate release notes as you update your extension.
0.0.1
it works