Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/swiftsoftwaregroup/cli-go

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/swiftsoftwaregroup/cli-go

  • v0.0.0-20240705193412-f525e7cafc79
  • Source
  • Go
  • Socket score

Version published
Created
Source

cli-go

Template for Command Line Interface (CLI) tool in Go

Development

Setup for macOS

Install goenv:

brew install goenv

Install Go:

# install go 1.22.5
goenv install 1.22.5

# to install latest Go version
goenv install latest

Work on macOS

Configure project:

source configure.sh

Open the project in Visual Studio Code:

code .

Build

go build ./...

Run

echo "John" > name.txt

./cli-go greet name.txt
./cli-go greet --language es name.txt
./cli-go greet -l bg name.txt

Output:

Hello, John!
Hola, John!
Здравей, John!

Test

go test -v

Generate Docs

godoc

Browse docs:

# this package
open http://localhost:6060/pkg/github.com/swiftsoftwaregroup/cli-go

# all packages
open http://localhost:6060/pkg/

How to create a new project

# create module
go mod init github.com/<username>/cli-go

# add packages
# see: https://cobra.dev
go get github.com/spf13/cobra

touch main.go

Tools:

go install golang.org/x/tools/cmd/godoc@latest

FAQs

Package last updated on 05 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc