Remove dead code

This commit is contained in:
Darren Shepherd 2019-03-01 16:27:07 -07:00
parent 70e6ca4ab8
commit ef4e34b289
2 changed files with 1 additions and 18 deletions

View File

@ -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 {

View File

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