gopher

module
v1.3.16 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT

README

GOPHER

GOPHER

Simple Golang Framework

Bases:

Pre requirement

macOS:

brew install go
echo 'export GOPATH="$HOME/go"' >> ~/.zshrc
echo 'export PATH="$PATH:$(go env GOPATH)/bin"' >> ~/.zshrc
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest

brew install protobuf
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install github.com/keepljg/protoc-go-inject-tag@latest

brew install --cask docker

Linux using apt:

wget https://go.dev/dl/go1.18.5.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.18.5.linux-amd64.tar.gz
echo 'export GOPATH="$HOME/go"' >> ~/.bashrc
echo 'export PATH=$PATH:$(go env GOPATH)/bin:/usr/local/go/bin"' >> ~/.bashrc
echo 'export PATH=$PATH:~/go/bin' >> ~/.bashrc
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest

apt install -y protobuf-compiler
apt install -y build-essential
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install github.com/keepljg/protoc-go-inject-tag@latest

Installation

go install github.com/pinosell/gopher/cmd/gopher@latest

How to use

  • Creating project codebase: gopher init -rep [REPOSITORY URL] -reg [REGISTERY URL]
  • Creating a new service: gopher srv -n [SERVICE NAME]
  • Creating a new command: gopher cmd -s [SERVICE NAME] -n [COMMAND NAME]
  • Creating a new application: gopher app -c [COMMAND NAME] -n [APPLICATION NAME]
  • Creating a new migration: gopher migrate -c [COMMAND NAME] -n [MIGRATION NAME]
  • Creating a new language: gopher lang -n [LANGUAGE ABBR]
  • Downloading project dependencies: gopher dep
  • Generating the project protobuf codes: gopher proto
  • Formatting the project codes: gopher fmt
  • Testing the project: gopher test
  • Building the project: gopher build
  • Build and running the project: gopher run
  • Running the project: gopher up

Jump to

Keyboard shortcuts

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