Say I have go:generate directives in two files: one in the foo/ directory and one in the mock/ directory. The generated mock code will need data structures from the generated code in the foo module. Will go generate ./... reliably generate code in the correct order? What do I need to do to make that happen?

  • mggnn@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    From the link you provided:

    Within a package, generate processes the source files in a package in file name order, one at a time. Within a source file, generate runs generators in the order they appear in the file, one at a time.