kubesphere / kubesphere/client-go
errors in sample code from README.md
- Dominant language
- Go
- Stars
- 10
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
The following sample code (from README.md) has some errors.
```
var client client.Client
config := &rest.Config{
Host: "127.0.0.1:9090",
Username: "admin",
Password: "P@88w0rd",
}
client = generic.NewForConfigOrDie(config, client.Options{Scheme: f.Scheme})
```
The variable `client` overrides the package `client`. Thus the following `client.Options` does not work.
In addition, there is no definition for the variable `f` used in `f.Scheme`. Can you please provide code for how the scheme is built?
Best regards,
Contributor guide
Research direction
Start by locating the sample snippet in README.md and checking the repository's current client and scheme setup for a matching example. Done when the sample no longer shadows the client package, defines the scheme used by f.Scheme, and can be followed without undefined variables.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100