From b51368ea86ee2e130402d546d4c668d61a9862b8 Mon Sep 17 00:00:00 2001 From: Paul Jolly Date: Thu, 11 Mar 2021 12:42:04 +0000 Subject: [PATCH] doc/tutorial/kubernetes: add required go mod init step A Go module is, as of a6169255, required in order for cue get go to resolve package arguments. This step is currently missing from the Kubernetes tutorial. There are more issues that need to be fixed as part of the Kubernetes tutorial, but these are covered in #824. Change-Id: I703f8159c79cd28cf2e27117b23c200518c2aee5 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/8962 Reviewed-by: Marcel van Lohuizen --- doc/tutorial/kubernetes/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/tutorial/kubernetes/README.md b/doc/tutorial/kubernetes/README.md index bd80827e3..34e97873b 100644 --- a/doc/tutorial/kubernetes/README.md +++ b/doc/tutorial/kubernetes/README.md @@ -77,6 +77,13 @@ We do that later by giving all the same package name. $ cue mod init ``` +We initialize a Go module so that later we can resolve the +`k8s.io/api/apps/v1` Go package dependency: + +``` +$ go mod init example.com +``` + Creating a module also allows our packages import external packages. Let's try to use the `cue import` command to convert the given YAML files