Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.
Discussion options

You must be logged in to vote

You can use a different package (instead of a different file in the same package. The package folder can be anything, but the package name in the Go file needs to be main. Then you can add a main function there and run it via CLI.

Create a folder seed in the root of your project, and create a file seed.go (but both folder and file name can be anything).

package main // <- note the main!

import (
	"log"
)

func main() {
	log.Printf("asdf")
}

Then run it via:

go run ./seed/main.go

Let me know if that helps.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by steebchen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants