mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-09-03 16:26:28 +00:00
feat: adding unit testing and example
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
This commit is contained in:
@@ -6,11 +6,11 @@ import (
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
client *kubernetes.Clientset
|
||||
Client kubernetes.Interface
|
||||
}
|
||||
|
||||
func (c *Client) GetClient() *kubernetes.Clientset {
|
||||
return c.client
|
||||
func (c *Client) GetClient() kubernetes.Interface {
|
||||
return c.Client
|
||||
}
|
||||
|
||||
func NewClient(kubecontext string, kubeconfig string) (*Client, error) {
|
||||
@@ -31,6 +31,6 @@ func NewClient(kubecontext string, kubeconfig string) (*Client, error) {
|
||||
}
|
||||
|
||||
return &Client{
|
||||
client: clientSet,
|
||||
Client: clientSet,
|
||||
}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user