From 7fdbc41ece3681846276d4315cb5c8e2e15e79a9 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Mon, 21 Mar 2022 12:19:37 +0000 Subject: [PATCH] Migrate to Go 1.17 for the go template Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- template/go/Dockerfile | 2 +- template/go/go.mod | 2 +- template/go/template.yml | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/template/go/Dockerfile b/template/go/Dockerfile index fe69c770..37078ac4 100644 --- a/template/go/Dockerfile +++ b/template/go/Dockerfile @@ -1,5 +1,5 @@ FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog -FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.15-alpine3.13 as builder +FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.17-alpine3.15 as builder ARG TARGETPLATFORM ARG BUILDPLATFORM diff --git a/template/go/go.mod b/template/go/go.mod index f8c3c1c6..64342319 100644 --- a/template/go/go.mod +++ b/template/go/go.mod @@ -1,5 +1,5 @@ module handler -go 1.15 +go 1.16 replace handler/function => ./function diff --git a/template/go/template.yml b/template/go/template.yml index 9b498f89..b4b9f253 100644 --- a/template/go/template.yml +++ b/template/go/template.yml @@ -17,12 +17,10 @@ build_options: - mysql-client - mysql-dev welcome_message: | - You have created a new function which uses Go 1.15 and the Classic + You have created a new function which uses Go 1.17 and the Classic OpenFaaS template. - To include third-party dependencies, use Go modules and use - "--build-arg GO111MODULE=on" with faas-cli build or configure this - via your stack.yml file. + Go modules is enabled by default. See more: https://docs.openfaas.com/cli/templates/