Browse Source

Remove dead code

pull/144/head
Darren Shepherd 6 years ago
parent
commit
ef4e34b289
  1. 7
      pkg/agent/config/config.go
  2. 12
      pkg/server/server.go

7
pkg/agent/config/config.go

@ -199,13 +199,6 @@ func get(envInfo *cmds.Agent) (*config.Node, error) {
return nodeConfig, nil
}
func defString(val, newVal string) string {
if val == "" {
return newVal
}
return val
}
func getConfig(info *clientaccess.Info) (*config.Control, error) {
data, err := clientaccess.Get("/v1-k3s/config", info)
if err != nil {

12
pkg/server/server.go

@ -10,7 +10,6 @@ import (
"os"
"path/filepath"
"strconv"
"strings"
"time"
"github.com/pkg/errors"
@ -24,7 +23,7 @@ import (
appsv1 "github.com/rancher/k3s/types/apis/apps/v1"
batchv1 "github.com/rancher/k3s/types/apis/batch/v1"
corev1 "github.com/rancher/k3s/types/apis/core/v1"
v1 "github.com/rancher/k3s/types/apis/k3s.cattle.io/v1"
"github.com/rancher/k3s/types/apis/k3s.cattle.io/v1"
rbacv1 "github.com/rancher/k3s/types/apis/rbac.authorization.k8s.io/v1"
"github.com/rancher/norman"
"github.com/rancher/norman/pkg/clientaccess"
@ -244,15 +243,6 @@ func setupDataDirAndChdir(config *config.Control) error {
return nil
}
func readTokenFile(file string) (string, error) {
content, err := ioutil.ReadFile(file)
if err != nil {
return "", err
}
return strings.TrimSpace(string(content)), nil
}
func printToken(httpsPort int, advertiseIP, prefix, cmd string) {
ip := advertiseIP
if ip == "" {

Loading…
Cancel
Save