Clean unused functions#56
Conversation
IsPreDefinedNetwork shouldn't be called from client side because it's related to server's platform and can only be decided from server side. Signed-off-by: Zhang Wei <[email protected]>
|
I think it makes sense to remove this functions. I rather not remove the whole files for now, until we're certain this is safe. I understand your point, we've had similar discussions before, I'd like to have someone's else eyes on it first. |
|
I think removing this function, I think the rest of the file is really just implementing a nicer interface for an enum and it's safe to call it from the client (although maybe not completely necessary). |
|
Yes, the reason why I'm trying to remove this function is I made some modifications once in moby/moby#19431, since this is unmeaning for client to call it, I think we'd better remove it, or we have to modify this duplicate function every time Docker makes some changes on it. |
|
And thank you for help review! 😄 |
This is a duplicate function of
docker/runconfig/hostconfig_unix.go, and we shouldn't call it from client side because it's related to platform.For example, if we have docker daemon running on Linux platform and client running on Windows platform, it's unmeaning for client to call
IsPreDefinedNetwork.Actually I think we can remove the whole file for same reason, and also some other functions. What do you think of this? @calavera
Signed-off-by: Zhang Wei [email protected]