Skip to content

Commit

Permalink
Fix Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
noisersup authored and alecthomas committed Sep 17, 2022
1 parent 3371bd6 commit 15aa6d8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Expand Up @@ -656,13 +656,14 @@ Example resolvers can be found in [resolver.go](https://github.com/alecthomas/ko
Command-line arguments are mapped to Go values via the Mapper interface:

```go
// A Mapper knows how to map command-line input to Go.
// A Mapper represents how a field is mapped from command-line values to Go.
//
// Mappers can be associated with concrete fields via pointer, reflect.Type, reflect.Kind, or via a "type" tag.
//
// Additionally, if a type implements the MapperValue interface, it will be used.
type Mapper interface {
// Decode scan into target.
//
// "ctx" contains context about the value being decoded that may be useful
// to some mappers.
Decode(ctx *MapperContext, scan *Scanner, target reflect.Value) error
// Decode ctx.Value with ctx.Scanner into target.
Decode(ctx *DecodeContext, target reflect.Value) error
}
```

Expand Down

0 comments on commit 15aa6d8

Please sign in to comment.