mogo

module
v0.75.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT

README

MoGo

Go CI Go Lint Go SAST Docs Visualization License

Overview

The mogo (pronounced "Mo Go" for "More Go") package provides a collection of Go utilities for common tasks.

Go is a small language which is useful from a development and maintenance perspective but it can result in common tasks being more verbose than other languages where there are more productivity methods. The mogo package's goal is to provide wrappers for common tasks in the same spirit of io/ioutil to make programming Go a bit faster.

In terms of scope, mogo is designed to cover all common areas, with a move to fewer dependencies.

See the following modules for extended functionality (with more dependencies):

Documentation

Documentation is provided using godoc and available on GoDoc.org.

Installation

$ go get github.com/grokify/mogo/...

SBOM

The SBOM is in the file [SBOM.spdx.json]. It is created using GitHub's built-in SBOM feature with the following additions:

  1. It is converted to indented JSON for easier reading.
  2. The packages[0].downloadLocation value as the commit hash added per https://spdx.github.io/spdx-spec/v2.3/package-information/.

Credits

See CREDITS

Contributing

Features, Issues, and Pull Requests are always welcome.

To contribute:

  1. Fork it ( http://github.com/grokify/mogo/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Please report issues and feature requests on Github.

Directories

Path Synopsis
archive
audio
bytes
cmd
mogo command
Package main provides the mogo CLI, a toolkit of small utilities backed by the github.com/grokify/mogo library.
Package main provides the mogo CLI, a toolkit of small utilities backed by the github.com/grokify/mogo library.
cmp
compress
aesutil
Package aesutil provides authenticated AES-GCM encryption utilities, including writing and reading encrypted files.
Package aesutil provides authenticated AES-GCM encryption utilities, including writing and reading encrypted files.
aesutil/aesecb
aesecb provides ECB (Electronic Codebook) mode for AES.
aesecb provides ECB (Electronic Codebook) mode for AES.
aesutil/aesopenssl
aesopenssl implements AES that is compatible with `aes-256-cbc -salt`.
aesopenssl implements AES that is compatible with `aes-256-cbc -salt`.
hmacutil
hmacutil provides HMAC utility functions.
hmacutil provides HMAC utility functions.
md5util
md5util supports MD5 hashes in various formats.
md5util supports MD5 hashes in various formats.
sshutil
Package sshutil provides helpers for working with SSH public keys, such as parsing `authorized_keys`-format `.pub` files and matching them against a SHA256 fingerprint (e.g.
Package sshutil provides helpers for working with SSH public keys, such as parsing `authorized_keys`-format `.pub` files and matching them against a SHA256 fingerprint (e.g.
examples/sql command
encoding provides generic encoding support.
encoding provides generic encoding support.
base10
base10 supports Base10 encoding.
base10 supports Base10 encoding.
base36
base36 supports Base36 encoding and decoding.
base36 supports Base36 encoding and decoding.
base62
base62 supports Base62 encoding and decoding.
base62 supports Base62 encoding and decoding.
base64
base64 supports Base64 encoding and decoding.
base64 supports Base64 encoding and decoding.
guid
encoding/guid supports encoding and decoding Guid values.
encoding/guid supports encoding and decoding Guid values.
errors
fmt
fmtutil
Package fmtutil implements some formatting utility functions.
Package fmtutil implements some formatting utility functions.
progress
Package progress provides terminal progress bar rendering with stage support.
Package progress provides terminal progress bar rendering with stage support.
git
html
image
exif
Package exif provides functionality for working with Exif metadata in images.
Package exif provides functionality for working with Exif metadata in images.
imageutil/cmd/crop command
Command crop crops, squares, and splits an image from a file or URL and writes the results as JPEG.
Command crop crops, squares, and splits an image from a file or URL and writes the results as JPEG.
imageutil/cmd/gifframes command
Command gifframes splits an animated GIF into composited PNG frames and prints frame timing metadata.
Command gifframes splits an animated GIF into composited PNG frames and prints frame timing metadata.
imageutil/cmd/merge_grid command
Command merge_grid merges images into a grid and writes it as a JPEG.
Command merge_grid merges images into a grid and writes it as a JPEG.
io
Package licenses provides helpers for identifying software license texts.
Package licenses provides helpers for identifying software license texts.
Package lintfix provides a structured database of lint rule remediations for Go projects using golangci-lint.
Package lintfix provides a structured database of lint rule remediations for Go projects using golangci-lint.
dupl
Package dupl provides helpers for generating nolint comments for the dupl linter (github.com/mibk/dupl), which flags structurally similar code blocks.
Package dupl provides helpers for generating nolint comments for the dupl linter (github.com/mibk/dupl), which flags structurally similar code blocks.
gosec
Package gosec provides helpers for generating nolint comments for gosec rules.
Package gosec provides helpers for generating nolint comments for gosec rules.
unparam
Package unparam provides helpers for generating nolint comments for the unparam linter (mvdan.cc/unparam), which flags a function parameter (or result) that never varies across its call sites.
Package unparam provides helpers for generating nolint comments for the unparam linter (mvdan.cc/unparam), which flags a function parameter (or result) that never varies across its call sites.
log
logutil
logutil provides logging utility functions which are useful for decreasing lines of code for simple error logging.
logutil provides logging utility functions which are useful for decreasing lines of code for simple error logging.
sanitize
Package sanitize provides functions for sanitizing user input before logging.
Package sanitize provides functions for sanitizing user input before logging.
severity
severity provides syslog-type severity level handling.
severity provides syslog-type severity level handling.
math
mime
multipartutil
Package multipartutil provides helper functionality for using multipart.Writer.
Package multipartutil provides helper functionality for using multipart.Writer.
ml
net
http/healthz
Package healthz provides standard liveness/readiness HTTP handlers and a dependency-free client-side probe, for services that need a consistent health contract without pulling in a framework.
Package healthz provides standard liveness/readiness HTTP handlers and a dependency-free client-side probe, for services that need a consistent health contract without pulling in a framework.
http/retryhttp
Package retryhttp provides an HTTP RoundTripper with exponential backoff retry logic and optional request pacing.
Package retryhttp provides an HTTP RoundTripper with exponential backoff retry logic and optional request pacing.
mailutil/threading
Package threading provides generic email thread reconstruction.
Package threading provides generic email thread reconstruction.
os
osutil
Package osutil implements some OS utility functions.
Package osutil implements some OS utility functions.
osutil/cmd/cp command
path
pointer package provides some pointer shortcuts.
pointer package provides some pointer shortcuts.
reflect
regexp
sort
strconv
testing
coverbadge/cmd/gocoverbadge command
Command gocoverbadge generates a Shields.io coverage badge for Go projects.
Command gocoverbadge generates a Shields.io coverage badge for Go projects.
time
cmd/dateadddays command
examples/uptime command
timeutil
timeutil provides a set of time utilities including comparisons, conversion to "DT8" int32 and "DT14" int64 formats and other capabilities.
timeutil provides a set of time utilities including comparisons, conversion to "DT8" int32 and "DT14" int64 formats and other capabilities.
timezone
timezone is a static list of timezones.
timezone is a static list of timezones.
timezone/examples/build_constants command
main this code was sourced from Stack Overflow here: https://stackoverflow.com/a/40130882/1908967
main this code was sourced from Stack Overflow here: https://stackoverflow.com/a/40130882/1908967
type
unicode

Jump to

Keyboard shortcuts

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