Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/Visitor-and-Patch.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ func (p *patcher) Visit(node *ast.Node) {
}
```

Type information is also available. Here is an example, there all `fmt.Stringer`
interface automatically converted to `string` type.
Type information is also available. In the following example, any struct
implementing the `fmt.Stringer` interface is automatically converted to `string` type.

```go
func main() {
Expand Down Expand Up @@ -136,6 +136,7 @@ func (p *stringerPatcher) Visit(node *ast.Node) {
Callee: &ast.MemberNode{
Node: *node,
Field: "String",
Property: &ast.StringNode{Value: "String"},
},
})
}
Expand Down