1
0
mirror of https://github.com/rancher/rke.git synced 2025-08-15 13:34:36 +00:00

Update to Golang 1.11

This commit is contained in:
Sebastiaan van Steenis 2018-10-17 20:55:33 +02:00 committed by Alena Prokharchyk
parent 1639bcdbd6
commit 22a339ea33
4 changed files with 33 additions and 33 deletions

View File

@ -11,7 +11,7 @@ RUN apt-get update && \
ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH=GOLANG_ARCH_${ARCH} \ ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH=GOLANG_ARCH_${ARCH} \
GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash
RUN wget -O - https://storage.googleapis.com/golang/go1.8.3.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \ RUN wget -O - https://storage.googleapis.com/golang/go1.11.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \
go get github.com/rancher/trash && go get golang.org/x/lint/golint go get github.com/rancher/trash && go get golang.org/x/lint/golint
ENV DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 \ ENV DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 \

View File

@ -764,7 +764,7 @@ func getTagMajorVersion(tag string) string {
} }
func getCloudConfigChecksum(config v3.CloudProvider) string { func getCloudConfigChecksum(config v3.CloudProvider) string {
configByteSum := md5.Sum([]byte(fmt.Sprintf("%s", config))) configByteSum := md5.Sum([]byte(fmt.Sprintf("%v", config)))
return fmt.Sprintf("%x", configByteSum) return fmt.Sprintf("%x", configByteSum)
} }

View File

@ -386,7 +386,7 @@ func GetContainerLogsStdoutStderr(ctx context.Context, dClient *client.Client, c
var containerLog string var containerLog string
clogs, logserr := ReadContainerLogs(ctx, dClient, containerName, follow, tail) clogs, logserr := ReadContainerLogs(ctx, dClient, containerName, follow, tail)
if logserr != nil { if logserr != nil {
logrus.Debug("logserr: %v", logserr) logrus.Debugf("logserr: %v", logserr)
return containerLog, fmt.Errorf("Failed to get gather logs from container [%s]: %v", containerName, logserr) return containerLog, fmt.Errorf("Failed to get gather logs from container [%s]: %v", containerName, logserr)
} }
defer clogs.Close() defer clogs.Close()

View File

@ -11,7 +11,7 @@ OS_ARCH_ARG[windows]="386 amd64"
OS_ARCH_ARG[darwin]="amd64" OS_ARCH_ARG[darwin]="amd64"
mkdir -p bin mkdir -p bin
[ "$(uname)" != "Darwin" ] && LINKFLAGS="-linkmode external -extldflags -static -s" [ "$(uname)" != "Darwin" ] && LINKFLAGS="-extldflags -static -s"
CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/rke CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/rke
if [ -n "$CROSS" ]; then if [ -n "$CROSS" ]; then