Compiling a package from a Go repo on Github

I'm trying to create an OpenWrt package from the following GitHub repo:

The Makefile I have so far:

include $(TOPDIR)/rules.mk

PKG_NAME:=phonebook
PKG_VERSION:=0.1
PKG_RELEASE:=$(AUTORELEASE)

PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Martin

PKG_SOURCE:=phonebook-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/finfinack/phonebook/tar.gz/${PKG_VERSION}?
PKG_HASH:=skip
PKG_BUILD_DEPENDS:=golang/glog
PKG_BUILD_PARALLEL:=1

GO_PKG:=github.com/finfinack/phonebook
GO_PKG_BUILD_PKG:=github.com/finfinack/phonebook

include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk

define Package/phonebook
  SECTION:=net
  CATEGORY:=Network
  SUBMENU:=Telephony
  TITLE:=A phonebook fetching and conversion tool intended for AREDN.
  URL:=https://github.com/finfinack/phonebook
  DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
endef

$(eval $(call GoBinPackage,phonebook))
$(eval $(call BuildPackage,phonebook))

With that, it seems go build is not able to find the package. I'm new to Makefiles for OpenWrt so please bear with me :slight_smile: Any pointers are highly appreciated, thank you.

...
Finding targets
no required module provides package github.com/finfinack/phonebook; to add it:
	go get github.com/finfinack/phonebook

Building targets
no Go files in /home/finack/Downloads/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/phonebook-0.1/.go_work/build

make[2]: *** [Makefile:36: /home/finack/Downloads/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/phonebook-0.1/.built] Error 1
...

any updates about this please im trying to compile a go package to include it in my openwrt image

I actually managed to compile my Go package eventually both manually as well as via GitHub actions. Unfortunately I do not remember anymore what the specific issue was since it‘s been a while but I hope that this provides the right pointers for you: https://github.com/arednch/packages

thank you for your help!!