mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-04 11:06:21 +00:00
proxy: do not decode proxy config
It is a well defined structure that needs no decoding. Signed-off-by: Peng Tao <bergwolf@gmail.com>
This commit is contained in:
parent
22aedc4fb6
commit
c41c9de839
@ -9,7 +9,6 @@ import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/mitchellh/mapstructure"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@ -132,9 +131,9 @@ func newProxyConfig(sandboxConfig *SandboxConfig) (ProxyConfig, error) {
|
||||
case KataProxyType:
|
||||
fallthrough
|
||||
case CCProxyType:
|
||||
if err := mapstructure.Decode(sandboxConfig.ProxyConfig, &config); err != nil {
|
||||
return ProxyConfig{}, err
|
||||
}
|
||||
config = sandboxConfig.ProxyConfig
|
||||
default:
|
||||
return ProxyConfig{}, fmt.Errorf("unknown proxy type %v", sandboxConfig.ProxyType)
|
||||
}
|
||||
|
||||
if config.Path == "" {
|
||||
|
Loading…
Reference in New Issue
Block a user