# README
Syntax-aware Patch
This package provides an intuitive way to patch the go code.
The purpose is to power xgo's patching mechanism.
See #169.
Examples
You can find more examples in the testdata directory.
The following example is taken from ./testdata/hello_world/.
original.go
:
package main
import "fmt"
func main() {
fmt.Printf("hello world\n")
}
original.go.patch
:
package main
func main(){
//append <id> fmt.Printf("the world is patched\n")
fmt.Printf("hello world\n")
}
result.go
:
package main
import "fmt"
func main() {
fmt.Printf("hello world\n")
fmt.Printf("the world is patched\n")
}
# Constants
No description provided by the author