Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions 001-gno-cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Getting Started with Gno CLI

In this section, you will learn to use the `gno` CLI to write and test Gnolang packages. This part does not rely on a blockchain; instead, it operates solely on the GnoVM.

## Steps

* Use `gno --help` to explore available commands and options.
* Use `gno test .` to test your Gnolang packages.
* For additional features, explore `gno doc`, etc.

Enjoy the journey of discovering and mastering the Gno CLI!
9 changes: 9 additions & 0 deletions 001-gno-cli/hello.gno
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package hello

func Sum(a, b int) int {
return a + b
}

func Greetings(name string) string {
return "Hello " + name + "!"
}
11 changes: 11 additions & 0 deletions 001-gno-cli/hello_test.gno
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package hello

import "testing"

func TestSum(t *testing.T) {
got := Sum(1, 2)
expected := 3
if got != expected {
t.Errorf("exected %d, got %d", expected, got)
}
}