hello

package module
v0.0.0-...-7c38b0c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

README

#############################################
github.com/hermantai/samples/go/playgomodules
#############################################

Try out go modules described in https://blog.golang.org/using-go-modules.

************
Important commands
************

init a module
::

  $ go mod init example.com/hello

List all dependencies
::

  $ go list -m all

Use a tagged version instead of a tagged one. This command would update go.mod.
::

  $ go get golang.org/x/text

Get a specific version
::

  $ go get rsc.io/sampler@v1.3.1

List versions of a module
::

  $ go list -m -versions rsc.io/sampler

Clean up dependencies
::

  $ go mod tidy

Tag a new version
::

  $ git tag v1.0.0
  $ git push origin v1.0.0

************
Run the code
************

Run tests
::

  $ go test

Run the sample script
::

  $ go run main/main.go

Outside of the repo, we can run commands with
::

  # download and install the package
  $ go run go get github.com/hermantai/samples/go/playgomodules/main

  # run it
  $ main

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hello

func Hello() string

func Proverb

func Proverb() string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL