go-coding

command module
v0.0.0-...-381b1be Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 7 Imported by: 0

README

go-coding

This is a project for Golang exercises.

Code Coverage GoDoc Build Status Go ReportCard

Project Structure


Introduction


Using Docker

Installing Go may not be needed if you choose to use Docker. With running a go-coding container, you can clone this repo at any location on your disk, for example $HOME/projects, without having to set $GOPATH. And you can still access (e.g. for editing) the source code locally.

```
# assume in your projects folder
cd $HOME/projects
git clone https://github.com/dockerian/go-coding.git
cd go-coding
```

To build and run in docker container, see here.


Build, test and run

The Makefile has included build, test, run targets. For example, to build, simply change to the project directory and run

make build # or ./build.sh

or to run tests

make test  # or ./run.sh test


End-to-end tests
  • MessageSender test
    • In order to run the test, inject environment variables to set user, pass, recipient, e.g.

      MAIL_TO='a@hotmail.com' \
      MAIL_USER='a@hotmail.com' MAIL_PASS='pass!wd' \
      make e2e
      

      Default mail server (MAIL_HOST): smtp.office365.com.
      Default auth: MAIL_TLS=true (otherwise using just LoginAuth)
      Default sender (MAIL_USER): jason_zhuyx@hotmail.com.
      And default recipient (MAIL_TO): jason_zhuyx@hotmail.com.


Documentation

This project uses godocdown and $(DOC_PACKAGES) in Makefile to generate documentations for some library packages

make doc


Learning Go


Code Coverage GoDoc Build Status Go ReportCard

Documentation

Overview

Package main :: main.go

Package main :: x.go - examples and tests Note: any function in `main` package but not in `main.go` seems invisible by `main()`

Directories

Path Synopsis
api
Package apimain :: app.go - main api entrance
Package apimain :: app.go - main api entrance
db
Package db :: db.go - MySql database functions
Package db :: db.go - MySql database functions
v1/client
Package client :: items__.go - Query result items
Package client :: items__.go - Query result items
Package demo :: chan.go
Package demo :: chan.go
ds
Package ds :: ds.go
Package ds :: ds.go
arr
Package arr :: matrix.go
Package arr :: matrix.go
exp
Package exp :: exp.go
Package exp :: exp.go
heap
Package heap :: heap.go
Package heap :: heap.go
maps
Package maps :: linkedlist.go
Package maps :: linkedlist.go
mathex
Package mathex :: fibo.go
Package mathex :: fibo.go
queue
Package queue :: queue.go
Package queue :: queue.go
stack
Package stack :: stack.go - stack implementations see https://gist.github.com/bemasher/1777766
Package stack :: stack.go - stack implementations see https://gist.github.com/bemasher/1777766
str
Package str :: reverse.go
Package str :: reverse.go
tree
Package tree :: tree.go
Package tree :: tree.go
trie
Package trie :: nodeStack.go
Package trie :: nodeStack.go
zip
Package zip :: zip.go
Package zip :: zip.go
Package github :: github.go
Package github :: github.go
Package interview :: meetup.go
Package interview :: meetup.go
pkg
api
Package api :: appError.go
Package api :: appError.go
cardgame
Package cardgame :: cardgame.go
Package cardgame :: cardgame.go
cfg
Package cfg :: aws.go - extended AWS SDK functions
Package cfg :: aws.go - extended AWS SDK functions
msg
Package msg :: mail.go - A simple email constructor and sender
Package msg :: mail.go - A simple email constructor and sender
net
Package net :: ipaddress.go
Package net :: ipaddress.go
orm
Package orm :: orm.go - extended ORM wrapper functions
Package orm :: orm.go - extended ORM wrapper functions
parking
Package parking :: builder.go
Package parking :: builder.go
sig
Package sig :: ddosRule.go - DDoS rule implementation
Package sig :: ddosRule.go - DDoS rule implementation
stock
Package stock :: buying.go
Package stock :: buying.go
str
Package str :: conv.go - extended string formatter functions
Package str :: conv.go - extended string formatter functions
zip
Package zip :: gzip.go - gzip writer and handler
Package zip :: gzip.go - gzip writer and handler
Package puzzle :: array.go
Package puzzle :: array.go
Package utils :: aws.go - extended AWS SDK functions
Package utils :: aws.go - extended AWS SDK functions

Jump to

Keyboard shortcuts

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