Skip to content

Gitart/GO-SIMPLE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💎 GO SIMPLE SAMPLES

изображение

image

pages-build-deployment

Samples for go language
Примеры использования языка GO

👌 Go Full

https://dasarpemrogramangolang.novalagung.com/5-go-command.html
https://www.golinuxcloud.com/golang-encrypt-decrypt/

👍 Other samples

https://www.golangprograms.com https://golangexample.com https://www.geeksforgeeks.org/atomic-variable-in-golang
https://www.educba.com/golang-atomic
https://golangdocs.com/atomic-operations-in-golang-atomic-package
https://www.geeksforgeeks.org/variadic-functions-in-go/

👍 Golang samples

https://github.com/golang/go/wiki#using-the-go-toolchain

📘 Library

https://github.com/golang/go/wiki/Projects
https://libs.garden/go/protocols?page=3
https://astaxie.gitbooks.io/build-web-application-with-golang/content/en/08.4.html

Task — это средство запуска/сборки задач, которое должно быть проще и удобнее в использовании, чем, например, GNU Make. https://github.com/go-task/task
https://taskfile.dev/usage/

Nosql DB Rose
https://github.com/flower-corp/rosedb

Tengo — это небольшой, динамичный, быстрый и безопасный язык сценариев для Go. https://github.com/d5/tengo

Обфусцируйте код Go, обернув цепочку инструментов Go. Требуется Go 1.18 или новее.
https://github.com/burrowers/garble

HTTPLoot — Go-инструмент для исследования безопасности веб-приложений. Позволяет автоматически сканировать, определять технический стек, заполнять формы, извлекать секреты из страниц ошибок/отладки и JavaScript-кода сайтов. Инструмент разработан командой RedHunt Labs. Свою результативность он уже доказал, найдя 1 676 634 секретов в результате двух этапов глубокого тестирования.

🔄 Description other oportunity

https://checkmarx.gitbooks.io/go-scp/content/output-encoding/cross-site-scripting.html

🥇 Samples

https://www.youtube.com/watch?v=53WkeeUVoTY
https://github.com/Rhymond/go-money
https://golang.org/doc/effective_go.html#init
http://www.golangbootcamp.com/book/interfaces
https://nanxiao.gitbooks.io/golang-101-hacks/content/posts/range.html
https://gobyexample.com/timers
http://golangtutorials.blogspot.com/2011/06/channels-in-go.html
http://guzalexander.com/2013/12/06/golang-channels-tutorial.html
https://gobyexample.com/non-blocking-channel-operations
https://medium.com/golangspec/range-over-channels-in-go-3d45dd825d2a
https://www.dotnetperls.com/chan-go
http://openmymind.net/Introduction-To-Go-Channels/
https://mmcgrana.github.io/2012/09/go-by-example-timers-and-tickers.html
http://devs.cloudimmunity.com/gotchas-and-common-mistakes-in-go-golang/
https://nanxiao.gitbooks.io/golang-101-hacks/content/posts/unbuffered-and-buffered-channels.html
https://www.golangprograms.com/go-slice-map-filter.html
https://www.golangprograms.com/go-language/slices-in-golang-programming.html https://www.golangprograms.com/remove-duplicate-values-from-slice.html
https://www.golangprograms.com/go-language/channels.html https://learningprogramming.net/golang/gorm/fetch-data-using-many-to-many-relationship-in-gorm/ https://gosamples.dev/string-byte-slice/ https://www.newthinktank.com/2015/02/go-programming-tutorial/
https://riptutorial.com/go/example/13468/logging-to-syslog
https://yourbasic.org/golang/
https://www.geeksforgeeks.org/data-types-in-go/
https://golangbot.com/custom-errors/
https://www.cosmiclearn.com/go/functions.php
https://aahansingh.com/data-structures-with-go-a1894b001940
https://www.techieindoor.com/golang-tutorial/
https://www.geeksforgeeks.org/golang-program-that-uses-func-with-variable-argument-list/
https://riptutorial.com/go/example/27479/how-to-encode-data-and-write-to-file-with-gob-
https://blog.carlmjohnson.net/post/2016-11-27-how-to-use-go-generate/
http://fabien-d.github.io/alertify.js/ https://alertifyjs.com/ http://wisembly.github.io/basil.js/

🌏 Frameworks

https://entgo.io/docs/crud/

🧑 Blogs

💡 Go - Awesome Tutorial

Go - 💡 Awesome Tutorial Part 2

🏖️ Req Expr

https://yourbasic.org/golang/regexp-cheat-sheet/ Limit exec program

🍬 Samples for learning

🧮 Other samples

https://golangify.com/today-date
https://yourbasic.org/golang/days-between-dates/
https://play.golang.org/p/63p-T9uFcZo

⏰ Days between two date

https://golang-blog.blogspot.com/2020/04/number-of-days-between-dates-in-golang.html
https://golangify.com/today-date
https://golangify.com/difference-dates-sub-since-until
https://www.geeksforgeeks.org/how-to-compare-times-in-golang/

🐱‍🏍 Work with date

https://www.programmersought.com/article/5604990010/
https://yourbasic.org/golang/days-between-dates/
https://www.socketloop.com/tutorials/golang-how-to-check-if-a-date-is-within-certain-range
https://www.tutorialspoint.com/barefoot_skiing/barefoot_skiing_starting_the_race.htm
https://yourbasic.org/golang/create-error/

📆 Parsing Date

https://tutorialedge.net/golang/snippets/parsing-date-strings-in-go/

🐱‍💻 Templates

https://gowebexamples.com/templates/

🎶 Paterns

https://refactoring.guru/ru/design-patterns/go
https://golangbyexample.com/add-or-subtract-to-time-go/

🏈 Push server

https://github.com/sharewind/push-server/tree/v3/broker

💖 Sample

https://play.golang.org/p/M972dltae2
https://play.golang.org/p/7M14RbGvU8
https://play.golang.org/p/vLIKNdSrpU
https://play.golang.org/p/1GVI37tisG

##🥽 Monitoring https://github.com/wgliang/goappmonitor

🍬 Go routine

https://go.dev/play/p/MSmQSaT02Fc

🥟 Sublime setting

https://www.alexedwards.net/blog/streamline-your-sublime-text-and-go-workflow

😎 Tutorial Series: How To Code in Go

Go (or GoLang) is a modern programming language originally developed by Google that uses high-level syntax similar to scripting languages. It is popular for its minimal syntax and innovative handling of concurrency, as well as for the tools it provides for building native binaries on foreign platforms.

🥧 Browse Series: 52 articles

Repository Stars Converts byte != 0 to bool?
golang/go 19,683 No
hybridgroup/gobot 2,278 Yes
streadway/amqp 933 Yes
vishvananda/netlink 216 No
GoBelieveIO/im_service 170 No
zeromq/zproto 114 No
istreamdata/orientgo 98 Yes
mitchellh/go-vnc 93 Yes

🚩 Useful library

  • Быстрый HTTP сервер с использованием valyala/fasthttp
  • Парсинг User-Agent через mssola/user_agent
  • Взаимодействие с GeoIP через oschwald/geoip2-golang
  • Быстрый - замена стандартному парсеру github.com/json-iterator/go
  • Firmata, как протокол для взаимодействия с ESP8266
  • Gobot, как фреймворк для работы с Firmata

This directory is intended for PlatformIO Unit Testing and project tests.

Unit Testing is a software testing method by which individual units of source code, sets of one or more MCU program modules together with associated control data, usage procedures, and operating procedures, are tested to determine whether they are fit for use. Unit testing finds problems early in the development cycle.

More information about PlatformIO Unit Testing:

An overview of tools that will help improve your Go code

All-in-one

  • golangci-lint - Bundle of gofmt, golint, govet and many other tools that shares work between the different linters for better performance. Recommended by the original author to replace gometalinter (Drop-in replacement).
  • DEPRECATED: gometalinter - Automates the installation, configuration and application of gofmt, golint, govet and several other code validation tools.

Code Formatting

Articles

Tools

  • air - Live reload for Go apps
  • gofmt - Start with the standard Go code formatter.
  • golint - Detects style mistakes in Go code.
  • goimports - Format code and fix your import statements.
  • gofumpt - A stricter gofmt.
  • revive - Fast, configurable, extensible, flexible, and beautiful linter for Go.

Code generation, Templating and Generics

  • json-to-go - Generate Go structs from JSON.
  • Go gen - Type-driven code generation (generics)
  • gojson - Another Go struct generator.
  • gotemplate - Package-based templating system for Go.
  • sqlgen - Generate Go code for SQL interactions.
  • zek - Generate Go struct from XML.
  • apidocgen - Generate web apis markdown docs and mocks.

Refactoring

Articles

Tools

  • eg - Example-based refactoring tool for Go.
  • gofmt - Start with the standard Go code formatter.
  • gorename - Renaming tool for Go.

Error Detection

Articles

Tools

Navigation

Visualization

  • godepgraph - A tool for generating dependency graphs of Go code.

💎 Course videos

Section 1: Working with database [Postgres]

Section 2: Building RESTful HTTP JSON API [Gin]

Section 3: Deploying the application to production [Kubernetes + AWS]

Section 4: Advanced Backend Topics [gRPC]

Simple bank service

The service that we’re going to build is a simple bank. It will provide APIs for the frontend to do following things:

  1. Create and manage bank accounts, which are composed of owner’s name, balance, and currency.
  2. Record all balance changes to each of the account. So every time some money is added to or subtracted from the account, an account entry record will be created.
  3. Perform a money transfer between 2 accounts. This should happen within a transaction, so that either both accounts’ balance are updated successfully or none of them are.

Setup local development

Install tools

Setup infrastructure

  • Create the bank-network

    make network
  • Start postgres container:

    make postgres
  • Create simple_bank database:

    make createdb
  • Run db migration up all versions:

    make migrateup
  • Run db migration up 1 version:

    make migrateup1
  • Run db migration down all versions:

    make migratedown
  • Run db migration down 1 version:

    make migratedown1

Documentation

  • Generate DB documentation:

    make db_docs
  • Access the DB documentation at this address. Password: secret

How to generate code

  • Generate schema SQL file with DBML:

    make db_schema
  • Generate SQL CRUD with sqlc:

    make sqlc
  • Generate DB mock with gomock:

    make mock
  • Create a new db migration:

    migrate create -ext sql -dir db/migration -seq <migration_name>

How to run

  • Run server:

    make server
  • Run test:

    make test

Deploy to kubernetes cluster

  • Install nginx ingress controller:

    kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.48.1/deploy/static/provider/aws/deploy.yaml
  • Install cert-manager:

    kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.4.0/cert-manager.yaml

⚒ Advanced

Golang Advanced Tutorial

Posted on November 22, 2020June 15, 2021 by admin

⚙ Table of Contents

Overview

Welcome to the Golang advanced tutorial series. The tutorial in this series are elaborative and we have tried to cover all concepts with examples. This tutorial is for those who are looking to gain expertise and a solid understanding of golang. We are looking for feedback as well if you find any mistakes or any improvements to be done.

Here is the link to the golang official website for reference https://golang.org/

This tutorial is divided into four parts

  • Golang Basic Topics
  • Golang Advanced Topics
  • All Design Patterns in Golang
  • Data structures in Golang

Golang Basic Tutorial

Let’s see some basic topics in go first

About

Basics

Loops/Iterations/Flow Control

More Types

Concurrency

Error Handling

Golang Advanced Tutorial

Let’s look at some advanced topics in go now.

OOPS in Golang

Others

All Design Patterns in Golang

Below is the list of all design patterns in go

Creational Design Patterns

Behavioural Design Patterns

Structural Design Patterns

Data Structures in Golang

About

These are simple examples for useful daily use in your projects.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published