gonbui
content reaches kernel¶We need to test the gonbui
defined in the git repository being tested.
For that we expect GONB_GIT_ROOT
to be set.
%goflags --cover --covermode=set
import "os"
%%
fmt.Printf("GOCOVERDIR=%s\n", os.Getenv("GOCOVERDIR"))
%goflags=["--cover" "--covermode=set"] GOCOVERDIR=/tmp/gonb_test_coverage.MljL9OTplr
!if [[ "${GONB_GIT_ROOT}" == "" ]] ; then \
echo "Please set GONB_GIT_ROOT before runnig this notebook!" 1>&2 ; \
else \
echo "ok" ; \
fi
ok
!*rm -f go.work && go work init && go work use . "${GONB_GIT_ROOT}"
%goworkfix
- Added replace rule for module "github.com/janpfeifer/gonb" to local directory "/home/janpf/Projects/gonb".
import "github.com/janpfeifer/gonb/gonbui"
%%
gonbui.DisplayHTML("html displayed")
%%
gonbui.DisplayMarkdown("markdown displayed")
markdown displayed