diff --git a/README.md b/README.md index 1bfefff79921659f79ca0eafe6964903bf07b93d..9b17b4fcad1ac09f2c14aad471f2a738f04e78c1 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ The following tags are supported: The functions are called up with a receiver. The receiver is the configuration. The function must have the following signature: -`func (d *Definition) <name> (s *setting[Definition])` +`func (d *Definition) <name> (s *xflags.Settings[Definition])` Let's assume we have the above definition. The Property `Serve` contains the command `serve`. Furthermore, the command has the tag `call` with @@ -87,13 +87,13 @@ The function is called with the receiver `*Definition` An example for the function `DoServe`: ```go -func (d *Definition) DoServe(_ *setting[Definition]) { +func (d *Definition) DoServe(_ *xflags.Settings[Definition]) { fmt.Printf("Serving on %s:%d", d.Serve.Host, d.Serve.Port) } ``` In this example, the function is called with the receiver `*Definition`. -The function is called with the setting `*setting[Definition]`. The +The function is called with the setting `*xflags.Settings[Definition]`. The setting is used to get the values of the flags. But in this example, we don't need the setting. So we use the underscore `_` to ignore the setting.