PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/p/nt/fqname/v0

Package
Open in gnoweb ↗

Overview

Kind
Pure package
Name
v0
Namespace
nt / fqname
Files
5 (README)(gnomod.toml)
Exported functions
n/a — not supported for pure packages by the node (vm/qfuncs)
Module
gno.land/p/nt/fqname/v0
gno
0.9

Files (5)

  • README.mdmarkdown
  • gnomod.tomltoml
  • doc.gnogno
  • fqname.gnogno
  • fqname_test.gnogno
fqname_test.gnogno
1package fqname23import (4	"testing"56	"gno.land/p/nt/uassert/v0"7)89func TestParse(t *testing.T) {10	tests := []struct {11		input           string12		expectedPkgPath string13		expectedName    string14	}{15		{"gno.land/p/nt/avl/v0.Tree", "gno.land/p/nt/avl/v0", "Tree"},16		{"gno.land/p/nt/avl/v0", "gno.land/p/nt/avl/v0", ""},17		{"gno.land/p/nt/avl/v0.Tree.Node", "gno.land/p/nt/avl/v0", "Tree.Node"},18		{"gno.land/p/nt/avl/v0/nested.Package.Func", "gno.land/p/nt/avl/v0/nested", "Package.Func"},19		{"path/filepath.Split", "path/filepath", "Split"},20		{"path.Split", "path", "Split"},21		{"path/filepath", "path/filepath", ""},22		{"path", "path", ""},23		{"", "", ""},24	}2526	for _, tt := range tests {27		pkgpath, name := Parse(tt.input)28		uassert.Equal(t, tt.expectedPkgPath, pkgpath, "Package path did not match")29		uassert.Equal(t, tt.expectedName, name, "Name did not match")30	}31}3233func TestConstruct(t *testing.T) {34	tests := []struct {35		pkgpath  string36		name     string37		expected string38	}{39		{"gno.land/r/demo/foo20", "Token", "gno.land/r/demo/foo20.Token"},40		{"gno.land/r/demo/foo20", "", "gno.land/r/demo/foo20"},41		{"path", "", "path"},42		{"path", "Split", "path.Split"},43		{"path/filepath", "", "path/filepath"},44		{"path/filepath", "Split", "path/filepath.Split"},45		{"", "JustName", ".JustName"},46		{"", "", ""},47	}4849	for _, tt := range tests {50		result := Construct(tt.pkgpath, tt.name)51		uassert.Equal(t, tt.expected, result, "Constructed FQName did not match expected")52	}53}5455func TestRenderLink(t *testing.T) {56	tests := []struct {57		pkgPath  string58		slug     string59		expected string60	}{61		{"gno.land/p/nt/avl/v0", "Tree", "[gno.land/p/nt/avl/v0](/p/nt/avl/v0).Tree"},62		{"gno.land/p/nt/avl/v0", "", "[gno.land/p/nt/avl/v0](/p/nt/avl/v0)"},63		{"github.com/a/b", "C", "github.com/a/b.C"},64		{"example.com/pkg", "Func", "example.com/pkg.Func"},65		{"gno.land/r/demo/foo20", "Token", "[gno.land/r/demo/foo20](/r/demo/foo20).Token"},66		{"gno.land/r/demo/foo20", "", "[gno.land/r/demo/foo20](/r/demo/foo20)"},67		{"", "", ""},68	}6970	for _, tt := range tests {71		result := RenderLink(tt.pkgPath, tt.slug)72		uassert.Equal(t, tt.expected, result, "Rendered link did not match expected")73	}74}75

Functions

not supported for pure packages by the node (vm/qfuncs)

Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.