Search code examples
gofyne

Error during building goLang program using Fyne GUI


"package command-line-arguments is not a main package"

This error showing when trying to build my go project using fyne gui


Solution

  • The package “main” tells the Go compiler that the package should compile as an executable program instead of a shared library. The main function in the package “main” will be the entry point of our executable program. When you build shared libraries, you will not have any main package and main function in the package.

    Use package main in place of the package you have created