From 49803b6d6a9b903f47b84c55ddb7be46590d6942 Mon Sep 17 00:00:00 2001 From: Volker Schukai <volker.schukai@schukai.com> Date: Sun, 6 Aug 2023 10:06:04 +0000 Subject: [PATCH] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1bfefff..9b17b4f 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. -- GitLab