[BUG][GO] Replace references to sw package with {{packageName}} in README template (#16812)

* Replace references to sw package with {{packageName}}

* Update samples
This commit is contained in:
Josh Raker
2023-10-14 22:37:27 -04:00
committed by GitHub
parent 8db9af9873
commit c5d6884c63
5 changed files with 51 additions and 51 deletions

View File

@@ -36,7 +36,7 @@ Default configuration comes with `Servers` field that contains server objects as
### Select Server Configuration
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
For using other server than the one defined on index 0 set context value `x_auth_id_alias.ContextServerIndex` of type `int`.
```golang
ctx := context.WithValue(context.Background(), x_auth_id_alias.ContextServerIndex, 1)
@@ -44,7 +44,7 @@ ctx := context.WithValue(context.Background(), x_auth_id_alias.ContextServerInde
### Templated Server URL
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
Templated server URL is formatted using default variables from configuration or from context value `x_auth_id_alias.ContextServerVariables` of type `map[string]string`.
```golang
ctx := context.WithValue(context.Background(), x_auth_id_alias.ContextServerVariables, map[string]string{
@@ -58,7 +58,7 @@ Note, enum values are always validated and all unused variables are silently ign
Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
Similar rules for overriding default operation server index and variables applies by using `x_auth_id_alias.ContextOperationServerIndices` and `x_auth_id_alias.ContextOperationServerVariables` context maps.
```golang
ctx := context.WithValue(context.Background(), x_auth_id_alias.ContextOperationServerIndices, map[string]int{
@@ -104,8 +104,8 @@ Example
```golang
auth := context.WithValue(
context.Background(),
sw.ContextAPIKeys,
map[string]sw.APIKey{
x_auth_id_alias.ContextAPIKeys,
map[string]x_auth_id_alias.APIKey{
"X-Api-Key": {Key: "API_KEY_STRING"},
},
)
@@ -125,8 +125,8 @@ Example
```golang
auth := context.WithValue(
context.Background(),
sw.ContextAPIKeys,
map[string]sw.APIKey{
x_auth_id_alias.ContextAPIKeys,
map[string]x_auth_id_alias.APIKey{
"api_key": {Key: "API_KEY_STRING"},
},
)