-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve generic list and namespacedlist #184
improve generic list and namespacedlist #184
Conversation
DanyT
commented
Apr 21, 2023
- allow empty apiGroup
- select rest api path based on apiGroup value
- allow empty apiGroup - select rest api path based on apiGroup value
|
Welcome @DanyT! |
a usage like the one bellow will not select the correct rest api path
a usage like the one below will result in segfault as strdup need non null input
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DanyT, ityuhui The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thank you for fixing this issue ! Do you want to solve the second problem you pointed out?
I think the following might be a fix: genericClient_t* genericClient_create(apiClient_t *client, const char *apiGroup, const char* apiVersion, const char* resourcePlural) {
...
result->apiGroup = apiGroup ? strdup(apiGroup) : NULL;
...
}
void genericClient_free(genericClient_t* client) {
if (client->apiGroup) {
free(client->apiGroup);
}
...
} |
yep. will do another pr soon. |