Code Monkey home page Code Monkey logo

goforit's Introduction

Gopherit Webcast Demo

Install Go

sudo apt update
sudo apt install golang -y

# OR
wget https://go.dev/dl/go1.20.5.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.20.5.linux-amd64.tar.gz

Update your PATH

cat << 'EOF' >> "${HOME}/.zshrc"

# Add ~/go/bin to path
[[ ":$PATH:" != *":${HOME}/go/bin:"* ]] && export PATH="${PATH}:${HOME}/go/bin"
# Set GOPATH
if [[ -z "${GOPATH}" ]]; then export GOPATH="${HOME}/go"; fi
EOF
fi

# now source .zshrc to initialize the changes
source ~/.zshrc

Lab 1

Initialize the project

mkdir โ€“p ~/projects/goforit && cd ~/projects/goforit
git init
go mod init github.com/USERNAME/PROJECTNAME
  • Initialize Cobra and add a subcommand
go install github.com/spf13/cobra-cli@latest
cobra-cli init

cobra-cli add scan
go mod tidy

Lab 2

Install Viper

go get github.com/spf13/viper
go mod tidy

Lab 3

Lint and Test

make -f Makefile lint
make -f Makefile test

Debugging

Step through the code with a debugger of your choice.

Lab 4

Install nmap library

go get -v github.com/Ullaakut/nmap/v2
go mod tidy

Lab 5

Install govalidator

go get -v github.com/asaskevich/govalidator
go mod tidy

goforit's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sbroekhoven

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.