golang.org/x/tools@v0.21.0/refactor/eg/testdata/I.template (about)

     1  package templates
     2  
     3  import (
     4  	"errors"
     5  	"fmt"
     6  )
     7  
     8  func before(s string) error { return fmt.Errorf("%s", s) }
     9  func after(s string) error {
    10  	n := fmt.Sprintf("error - %s", s)
    11  	return errors.New(n)
    12  }