gosimple

module
v0.0.0-...-24ca9bf Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT

README

gosimple

Tricky and fun utilities for Go programs.


GitHub Workflow Status Codecov

Contributor Covenant

Twitter Follow GitHub followers


Getting Started

Prerequisites
  • Go - I recommend the latest stable release. At least 1.18 is required for generic features.
  • Git - I recommend the latest stable release.
  • GitHub CLI - you can use git on the command line if you wish, but the github cli is very nice ...

Developed with Go 1.16.4. Updated to Go 1.18. Go is extremely backwards compatible and semver stable. Nearly any v1.x should work fine.


Installation

To download the repo and use it as a dependency in your module:

$ go get github.com/skeptycal/gosimple

To build and install this package as a utility (if it has a main package) on your machine so you can use it from the command line:


$ gh repo clone skeptycal/gosimple

$ cd gosimple

# test results and coverage info
$ ./go.test.sh

# build the application with race detection enabled.
$ go build -race

# install as a utility package
$ go install
Use Template

To use this repo as a template for your own project:

$ gh repo create -y --public --template "https://github.com/skeptycal/gosimple"
Contributing

To clone this repo to test and contribute, use git clone or gh repo clone.

$ gh repo clone skeptycal/gosimple

$ cd gosimple

# or choose a name or issue you wish
$ git branch -b dev

Use the Issues and PR templates on the GitHub repo page to contribute.


Basic Usage

This is a copy of the example script available in the cmd/example/gosimple folder:

package main

import "github.com/skeptycal/gosimple"

func main() {
    gosimple.Example()
}

To try it out:

# change to the sample folder
$ cd cmd/example/gosimple

# run the main.go program
$ go run ./main.go


Code of Conduct and Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us. Please read the Code of Conduct for details before submitting anything.


Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.


Contributors and Inspiration

  • Michael Treanor (GitHub / Twitter) - Initial work, updates, maintainer
  • Francesc Campoy - Inspiration and great YouTube videos!

See also the list of contributors who participated in this project.


License

Licensed under the MIT https://opensource.org/licenses/MIT - see the LICENSE file for details.

Directories

Path Synopsis
apps
cli
Package cli contains utility functions for dealing with cli commands within CLI applications written in Go.
Package cli contains utility functions for dealing with cli commands within CLI applications written in Go.
ansi
Package ansi provides an extensive set of ANSI escape codes for use in command line interfaces (CLIs) using industry standard well-documented terminal commands.
Package ansi provides an extensive set of ANSI escape codes for use in command line interfaces (CLIs) using industry standard well-documented terminal commands.
errorlogger
Package errorlogger implements error logging to a variety of output formats.
Package errorlogger implements error logging to a variety of output formats.
terminal
Package terminal provides information about the state of the terminal.
Package terminal provides information about the state of the terminal.
cmd
*
goutil_playground/manage/gnuflags
standard command line flags based on GNU standards.
standard command line flags based on GNU standards.
goutil_playground/soexamples
package main contains a Response to Stack Overflow question 71677581
package main contains a Response to Stack Overflow question 71677581
goutil_playground/soexamples/71677581
package main contains a Response to Stack Overflow question 71677581
package main contains a Response to Stack Overflow question 71677581
goutil_playground/sort
Package sort provides a generic implementation of the standard library sort package primitives for sorting slices and user-defined collections.
Package sort provides a generic implementation of the standard library sort package primitives for sorting slices and user-defined collections.
datatools
binarysearchtree
Package binarysearchtree creates a BinarySearchTree data structure for the Key and Value types specified in in the constraints of the generic structs and interfaces.
Package binarysearchtree creates a BinarySearchTree data structure for the Key and Value types specified in in the constraints of the generic structs and interfaces.
cmd/mandlebrot
Reference: https://gist.github.com/esimov/970a3816dda12e4059e3
Reference: https://gist.github.com/esimov/970a3816dda12e4059e3
format
Package format contains functions that format numeric values.
Package format contains functions that format numeric values.
math/polynomial
Package polynomial provides functions that support polynomial arithmetic.
Package polynomial provides functions that support polynomial arithmetic.
mysql
Package mysql provides support for persistent database connections.
Package mysql provides support for persistent database connections.
random
There are several broad categories of random data that can be generated by random:
There are several broad categories of random data that can be generated by random:
Package gogit implements git cli commands in a more convenient way.
Package gogit implements git cli commands in a more convenient way.
http
io
examples/comments
Sample comment reader.
Sample comment reader.
os
gofile
Package gofile provides support for file operations.
Package gofile provides support for file operations.
ls
redlogger
// Package redlogger implements logging to an io.Writer (default stderr) // with text wrapped in ANSI escape codes
// Package redlogger implements logging to an io.Writer (default stderr) // with text wrapped in ANSI escape codes
repo
gomake
Package gogithub implements a set of functions that access the GitHub API v3.0
Package gogithub implements a set of functions that access the GitHub API v3.0
seeker
package seeker is a simplified web browser implementation used to search specifically for text and numerical data.
package seeker is a simplified web browser implementation used to search specifically for text and numerical data.
benchmark/sample_benchmarks/fib/fib
Package fib contains sample benchmarks for Fibonacci numbers.
Package fib contains sample benchmarks for Fibonacci numbers.
constraints
Package constraints defines a set of useful constraints to be used with type parameters.
Package constraints defines a set of useful constraints to be used with type parameters.
visualization
webtools
http
Package http contains utilities for http requests.
Package http contains utilities for http requests.
*

Jump to

Keyboard shortcuts

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