mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Remove dead code
This commit is contained in:
parent
70e6ca4ab8
commit
ef4e34b289
@ -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 {
|
||||
|
@ -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…
Reference in New Issue
Block a user