gopher-labs

command module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 1 Imported by: 0

README

gopher-labs

ci

My Golang laboratory experiments ⏳

labs

myconfig
go run labs.go myconfig
mydocker
go run labs.go mydocker --name [list|run|attach]
mykube
# local cluster
minikube start --driver=docker --embed-certs
minikube delete --all

go run labs.go mykube --name [list|exec]

# setup portforward example
# minikube kubectl -- apply -f ./data/install-alpine-xfce-vnc.yaml
go run labs.go mykube --name create

# vncviewer localhost:5900
# http://localhost:6080
go run labs.go mykube --name portforward

# pre-download to solve issue: ErrImagePull (120 seconds timeout)
minikube image load edgelevel/alpine-xfce-vnc:web-0.6.0
mylog
# zap logging examples
go run labs.go mylog
myschema
# JSON and Yaml schema validation
go run labs.go myschema
myspinner
go run labs.go myspinner
myssh
# start server
go run labs.go myssh server

# test
nc 127.0.0.1 2222

# connect with openssh
ssh-keygen -f ~/.ssh/known_hosts -R "[localhost]:2222"
ssh -o StrictHostKeyChecking=no foo@localhost -p 2222

# connect with client
go run labs.go myssh client
version
# git version
go run \
  -ldflags="-X github.com/niqdev/gopher-labs/internal.Version=$(git rev-parse HEAD)" \
  labs.go version

Resources

Development

Install

# ubuntu
sudo snap install --classic go

# macos
brew install go

Setup

# init project (first time)
go mod init github.com/niqdev/gopher-labs

# install|update dependencies
go mod tidy

# run
go run labs.go

# build
just
./build/labs

TODO

  • aws
  • http client/server json api
  • add docs
  • vet/fmt/lint action
  • tests

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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