Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
proxy: do not decode proxy config
Browse files Browse the repository at this point in the history
It is a well defined structure that needs no decoding.

Signed-off-by: Peng Tao <[email protected]>
  • Loading branch information
bergwolf committed Sep 14, 2018
1 parent 22aedc4 commit c41c9de
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions virtcontainers/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"fmt"
"path/filepath"

"github.com/mitchellh/mapstructure"
"github.com/sirupsen/logrus"
)

Expand Down Expand Up @@ -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 == "" {
Expand Down

0 comments on commit c41c9de

Please sign in to comment.