All Projects → go-playground → mold

go-playground / mold

Licence: MIT license
✂️ Is a general library to help modify or set data within data structures and other objects.

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to mold

hast-util-sanitize
utility to sanitize hast nodes
Stars: ✭ 34 (-70.18%)
Mutual labels:  clean, sanitize
minimum-viable-startpage
A very simple startpage to replace new tab in a browser of choice.
Stars: ✭ 61 (-46.49%)
Mutual labels:  clean
white-theme-vscode
Minimalist monochrome theme for Visual Studio Code
Stars: ✭ 66 (-42.11%)
Mutual labels:  clean
hyper-clean
✨ A clean Hyper theme with IBM Design colors
Stars: ✭ 30 (-73.68%)
Mutual labels:  clean
ReshaperForBurp
Burp Suite Extension - Trigger actions and reshape HTTP request/response and WebSocket traffic using configurable rules
Stars: ✭ 32 (-71.93%)
Mutual labels:  modify
CleanSwiftArchitectureGenerator
🔨 A generator of Clean Swift Architecture files
Stars: ✭ 56 (-50.88%)
Mutual labels:  clean
timelite
String date and time utilities 🕙
Stars: ✭ 17 (-85.09%)
Mutual labels:  sanitize
birthday.py
🎉 A simple discord bot in discord.py that helps you understand the usage of SQL databases
Stars: ✭ 30 (-73.68%)
Mutual labels:  clean
clean-code-php
Persian translation of clean code concepts in PHP | ترجمه فارسی مفاهیم کد تمیز در پی اچ پی
Stars: ✭ 38 (-66.67%)
Mutual labels:  clean
CSGO
A CSGO "base" with aimbot, BSP parsing, bunnyhop, triggerbot, aimassist, no flash and walkbot, glow esp
Stars: ✭ 80 (-29.82%)
Mutual labels:  clean
read-env
🔧 Transform environment variables into JSON object with sanitized values.
Stars: ✭ 60 (-47.37%)
Mutual labels:  sanitize
harbor-cleaner
Clean images in Harbor by policies
Stars: ✭ 29 (-74.56%)
Mutual labels:  clean
goplay
The Go Playground (https://play.golang.org/) client
Stars: ✭ 75 (-34.21%)
Mutual labels:  go-playground
remove-files-webpack-plugin
A plugin for webpack that removes files and folders before and after compilation.
Stars: ✭ 48 (-57.89%)
Mutual labels:  clean
safe-svg
Enable SVG uploads and sanitize them to stop XML/SVG vulnerabilities in your WordPress website.
Stars: ✭ 129 (+13.16%)
Mutual labels:  sanitize
podhd
PODHD Preset Tool -- Modify And Convert Line6 POD HD Presets, Setlists And Bundles.
Stars: ✭ 37 (-67.54%)
Mutual labels:  modify
skeleton-loader
Loader module for webpack to execute your custom procedure. It works as your custom loader.
Stars: ✭ 19 (-83.33%)
Mutual labels:  modify
safe-marked
Markdown to HTML using marked and DOMPurify. Safe by default.
Stars: ✭ 31 (-72.81%)
Mutual labels:  sanitize
CleanUI
Android library to create beautiful, clean and minimal UIs.
Stars: ✭ 19 (-83.33%)
Mutual labels:  clean
nodejs-clean
Clean Architecture with Node.js + Express.js
Stars: ✭ 136 (+19.3%)
Mutual labels:  clean

Package mold

Project status Build Status Coverage Status Go Report Card GoDoc License

Package mold is a general library to help modify or set data within data structures and other objects.

How can this help me you ask, please see the examples here

Installation

Use go get.

go get -u github.com/go-playground/mold/v4

Examples

Example Description
simple A basic example with custom function.
full A more real life example combining the usage of multiple packages.

Modifiers

These functions modify the data in-place.

Name Description
default Sets the provided default value only if the data is equal to it's default datatype value.
trim Trims space from the data.
ltrim Trims spaces from the left of the data provided in the params.
rtrim Trims spaces from the right of the data provided in the params.
tprefix Trims a prefix from the value using the provided param value.
tsuffix Trims a suffix from the value using the provided param value.
lcase lowercases the data.
ucase Uppercases the data.
snake Snake Cases the data.
camel Camel Cases the data.
title Title Cases the data.
ucfirst Upper cases the first character of the data.
strip_alpha Strips all ascii characters from the data.
strip_num Strips all ascii numeric characters from the data.
strip_alpha_unicode Strips all unicode characters from the data.
strip_num_unicode Strips all unicode numeric characters from the data.
strip_punctuation Strips all ascii punctuation from the data.

Scrubbers

These functions obfuscate the specified types within the data for pii purposes.

Name Description
emails Scrubs multiple emails from data.
email Scrubs the data from and specifies the sha name of the same name.
text Scrubs the data from and specifies the sha name of the same name.
name Scrubs the data from and specifies the sha name of the same name.
fname Scrubs the data from and specifies the sha name of the same name.
lname Scrubs the data from and specifies the sha name of the same name.

Special Information

  • To use a comma(,) within your params replace use it's hex representation instead '0x2C' which will be replaced while caching.

Contributing

I am definitly interested in the communities help in adding more scrubbers and modifiers. Please send a PR with tests, and prefereably no extra dependencies, at lease until a solid base has been built.

Complimentary Software

Here is a list of software that compliments using this library post decoding.

  • validator - Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving.
  • form - Decodes url.Values into Go value(s) and Encodes Go value(s) into url.Values. Dual Array and Full map support.

License

Distributed under MIT License, please see license file in code for more details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].