File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -32,20 +32,19 @@ const (
3232// TrySetNetworkMount attempts to set the network mounts given a provided destination and
3333// the path to use for it; return true if the given destination was a network mount file
3434func (container * Container ) TrySetNetworkMount (destination string , path string ) bool {
35- if destination == "/etc/resolv.conf" {
35+ switch destination {
36+ case "/etc/resolv.conf" :
3637 container .ResolvConfPath = path
3738 return true
38- }
39- if destination == "/etc/hostname" {
39+ case "/etc/hostname" :
4040 container .HostnamePath = path
4141 return true
42- }
43- if destination == "/etc/hosts" {
42+ case "/etc/hosts" :
4443 container .HostsPath = path
4544 return true
45+ default :
46+ return false
4647 }
47-
48- return false
4948}
5049
5150// BuildHostnameFile writes the container's hostname file.
You can’t perform that action at this time.
0 commit comments