gzuidhof / tygo

Generate Typescript types from Golang source code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Usage with local checked out repo

singhsays opened this issue · comments

How do I use tygo with a local checked out golang repo with go modules. My go.mod has

module github.com/name/reponame

In the config file I tried

packages:

  • path: 'github.com/name/reponame'

=> Tygo failed: [-: no required module provides package github.com/name/reponame; to add it:
go get github.com/name/reponame]

packages:

  • path: '.'

=> Tygo failed: [-: no Go files in /workspace/src/reponame]

packages:

  • path: './...'

=> Config not found for package github.com/name/reponame/subdir

My mistake, turns out my golang repo doesn't have any top level go files. Everything is organized into cmd/ and subpackages. When I configured with github.com/name/repo/subpkg it worked just fine.