-
Originally opened by @ymolists in cuelang/cue#1050 I am trying to import a type from a package. I could not find an example that shows how i can achieve this in the docs. I looked at the docs in Modules, Packages, and Instances but was not able to figure this. Would it make sense to add a simple case ? I am most likely missing something since i am new here so please bear with me // ./main.cue
package main
import (
"example.com/pkg/test"
)
// A spec is of type #Spec
spec: #test.Spec
spec: {
kind: "Homo Sapiens"
} // ./test/test.cue
package test
#Spec: {
kind: string
} // ./cue.mod/module/module.cue
module: "example.com/pkg"
Edit:
|
Beta Was this translation helpful? Give feedback.
Answered by
cueckoo
Jul 3, 2021
Replies: 1 comment
-
Original reply by @ymolists in cuelang/cue#1050 (comment) i changed it to |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
cueckoo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Original reply by @ymolists in cuelang/cue#1050 (comment)
i changed it to
test.#Spec
instead and it works !