my-go-examples

module
v0.0.0-...-cf25b83 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: MIT

README

my-go-examples

Go Report Card GoDoc Maintainability Issue Count License

A place to keep my go snippets and examples.

Table of Contents,

Documentation and reference,

GO EXAMPLES

All sections in alphabetical order.

ARCHITECTURES

Using go to build fun things.

  • BLOCKCHAIN

  • SCRAPING

    coming soon

BASIC SYNTAX

Just your basic syntax examples in go.

  • DATA TYPES

  • FUNCTIONS

  • INTERFACES

  • METHODS

CGO

Using c with go.

CLIENT/SERVER

Lets make a server.

  • HTTP

  • gRPC

  • TCP/IP

CLOUD SERVICE PROVIDERS

AWS and Google services.

COMMON GO

A good place to start.

  • ERROR REPORTING

    • errors

      Error Handling using the standard error package.

  • FLAGS

    • flag

      The standard flag package makes it easy to implement command-line flag parsing.

  • LOGGING

    • logrus

      Logging using non-standard logrus package.

  • MY GENERIC GO TEMPLATE

  • TESTING

COMMUNICATION

Talk to me.

API

Application communication.

  • ASYNCHRONOUS

    • MESSAGE QUEUES

    • TCP/IP

  • SYNCHRONOUS

    • gRPC

    • REST

INTER PROCESS COMMUNICATION (IPC)

Process level communication.

  • ASYNCHRONOUS

    • CHANNELS (UNBUFFERED)

    • SOCKETS

  • SYNCHRONOUS

    • CHANNELS (BUFFERED)

    • PIPES

CRYPTOGRAPHY

Secure communication techniques.

  • ASYMMETRIC CRYPTOGRAPHY

    Great for digital signatures (verify sender) and receiving encrypted data.

  • HASHING

    Great for getting fingerprints.

  • SYMMETRIC CRYPTOGRAPHY

    Using the same key to encrypt and decrypt.

DATABASES

Save and organize your data.

GOROUTINES

Go is written for concurrency. The go runtime schedules goroutines on threads. The OS schedules these threads on cpus/cores.

INPUT/OUTPUT

Using the io package to read data and write data to/from various IO (files, buffers, pipes).

  • IO READER

  • IO WRITER

IoT

Using go with the Internet of Things (IoT).

  • RASPBERRY PI

Directories

Path Synopsis
erase
api/OAuth-2.0-google-cloud-storage-api-over-NATS/backend
Package main is a generated protocol buffer package.
Package main is a generated protocol buffer package.
api/OAuth-2.0-google-cloud-storage-api-over-NATS/frontend
Package main is a generated protocol buffer package.
Package main is a generated protocol buffer package.
api/OAuth-2.0-google-cloud-storage-api-over-NATS/proto
Package main is a generated protocol buffer package.
Package main is a generated protocol buffer package.
testing/gomock/laboratory
Package laboratory is a generated GoMock package.
Package laboratory is a generated GoMock package.

Jump to

Keyboard shortcuts

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