go-toolbox

module
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0

README

Go-ToolbOX

Go-toolbOx is characterized by daily work requirements and extension development, encapsulated generic tool classes

stable license download release commit issues pull fork star go size contributors codecov Go Report Card Go Reference Sourcegraph

Go-toolbOx's key features are:

  • convert: Indicates the conversion between data types. For example, converting a string to an integer, or converting a date format from one form to another.

  • desensitize: In data processing and privacy protection, it refers to removing or obscurating sensitive information to prevent data leakage. For example, removing personally identifiable information (PII) or encrypting data.

  • json JavaScript Object Notation (JSON) is a lightweight data interchange format that is commonly used for data transfer between Web applications.

  • moment: One that parses, validates, manipulates, and displays dates and times, simplifying date and time processing.

  • next: ip region and so on

  • numberx: A library of tools for working with numbers that provides extensions to numbers.

  • random: Random number generators are used in a variety of applications, such as games, simulations, and security protocols.

  • regex: Regular Expression is widely used for text processing, data verification, and search and replacement operations.

  • retry: indicates the process of retrying the operation if it fails. It is used in network requests and database operations to improve system reliability.

  • sign: In programming, 'sign' usually refers to a signature, especially in the context of security and encryption. It can be used to verify the integrity and origin of data, such as word signature and message signature.

  • stringx: A library of tools used to handle strings, providing extended functions for strings, such as formatting, splitting, concatenation, etc. Implementations may vary by language or library.

  • osx: A programming interface or library associated with the system for interacting with the operating system.

  • uuid: Universally Unique Identifier (UUID) is a standardized identifier used to uniquely identify information in a distributed system. Uuids are usually used in scenarios such as database primary key and session ID.

  • validator: A tool or library used to verify the validity of data. For example, form validation, data format validation, etc., to ensure that the input data conforms to the expected format and rules.

  • zipx: A library of tools related to compression and decompression.

Getting started

Prerequisites

requires Go version 1.20 or above.

Getting

With Go's module support, go [build|run|test] automatically fetches the necessary dependencies when you add the import in your code:

import "github.com/kamalyes/go-toolbox"

Alternatively, use go get:

go get -u github.com/kamalyes/go-toolbox

Directories

Path Synopsis
pkg
convert
* @Author: kamalyes 501893067@qq.com * @Date: 2024-08-03 21:32:26 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-11-03 13:57:05 * @FilePath: \go-toolbox\pkg\convert\convert.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
* @Author: kamalyes 501893067@qq.com * @Date: 2024-08-03 21:32:26 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-11-03 13:57:05 * @FilePath: \go-toolbox\pkg\convert\convert.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
desensitize
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-08-03 22:19:05 * @FilePath: \go-toolbox\pkg\desensitize\constants.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-08-03 22:19:05 * @FilePath: \go-toolbox\pkg\desensitize\constants.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
json
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-11-03 22:55:31 * @FilePath: \go-toolbox\pkg\json\base.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-11-03 22:55:31 * @FilePath: \go-toolbox\pkg\json\base.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
moment
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-10-15 15:55:10 * @FilePath: \go-toolbox\pkg\moment\base.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-10-15 15:55:10 * @FilePath: \go-toolbox\pkg\moment\base.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
numberx
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-11-01 02:25:56 * @FilePath: \go-toolbox\pkg\numberx\compare.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-11-01 02:25:56 * @FilePath: \go-toolbox\pkg\numberx\compare.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
osx
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-10-16 19:51:55 * @FilePath: \go-toolbox\pkg\osx\base.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-10-16 19:51:55 * @FilePath: \go-toolbox\pkg\osx\base.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
random
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-08-05 09:16:55 * @FilePath: \go-toolbox\pkg\random\model.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-08-05 09:16:55 * @FilePath: \go-toolbox\pkg\random\model.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
regex
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-07-30 17:26:07 * @FilePath: \go-toolbox\pkg\regex\any.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-07-30 17:26:07 * @FilePath: \go-toolbox\pkg\regex\any.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
retry
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-11-01 22:07:18 * @FilePath: \go-toolbox\pkg\retry\retry.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-11-01 22:07:18 * @FilePath: \go-toolbox\pkg\retry\retry.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
sign
* @Author: kamalyes 501893067@qq.com * @Date: 2024-10-23 17:37:08 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-10-23 17:58:07 * @FilePath: \go-toolbox\pkg\sign\aes.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
* @Author: kamalyes 501893067@qq.com * @Date: 2024-10-23 17:37:08 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-10-23 17:58:07 * @FilePath: \go-toolbox\pkg\sign\aes.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
stringx
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-11-01 22:06:35 * @FilePath: \go-toolbox\pkg\stringx\base.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.
* @Author: kamalyes 501893067@qq.com * @Date: 2023-07-28 00:50:58 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2024-11-01 22:06:35 * @FilePath: \go-toolbox\pkg\stringx\base.go * @Description: * * Copyright (c) 2024 by kamalyes, All Rights Reserved.

Jump to

Keyboard shortcuts

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