Categorygithub.com/ansgarm/example-jsii-srcmak-go
modulepackage
0.0.0-20210517133942-20d9bf94dff7
Repository: https://github.com/ansgarm/example-jsii-srcmak-go.git
Documentation: pkg.go.dev

# README

example-jsii-srcmak-go

This example uses patch-package to patch jsii-srcmak to contain the wip Go support developed in this PR.

This repo contains a simple Go program and uses JSII to include TypeScript code in the Go project.

It serves as an example to be able to talk about how Go support might work in jsii-srcmak.

The generated code is checked in to be able to link to it

hello vs. hola

  • hello.ts is included without a go.mod file and needs no require in the root go.mod
  • hola.ts has a go.mod file and needs require & replace in the root go.mod.

If hola is used without require/replace, go build fails with the following error:

main.go:7:2: no required module provides package github.com/ansgarm/example-jsii-srcmak-go/generated/hola; to add it:
        go get github.com/ansgarm/example-jsii-srcmak-go/generated/hola

Steps to run it

yarn install
yarn build
go run main.go # should print "Hello World\nHola\n"

# Packages

No description provided by the author