ztool

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: MIT Imports: 7 Imported by: 2

README

Z Tool was born to make Go development faster github repository address gitee code cloud warehouse address

Language:English 简体中文

一、Introduction

ZTool It is a small and fast tool library. Through method encapsulation, it reduces the learning cost of related APIs, improves work efficiency, and makes developing and writing code in GO language more elegant.

The tools and methods in ZTool come from our two-year-long summary of using the go language for actual project development. It covers the methods commonly used in GO development. It is not only a tool to solve small problems in the development of large-scale projects, but also a small project. responsibility for efficiency in

ZTool saves developers the time to encapsulate common classes and common tool methods in the project, makes development focus on business, and can avoid bugs caused by imperfect encapsulation to the greatest extent.

二、Introduction

1、go environment preparation
  1. go development environment installation
  1. go env To view and verify the environment information of go, for example, some of my configuration information is as follows:
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/Janus/Library/Caches/go-build"
GOENV="/Users/Janus/Library/Application Support/go/env"
GOMODCACHE="/Users/Janus/gopath/pkg/mod"
GONOPROXY="github.com"
GONOSUMDB="github.com"
GOPATH="/Users/Janus/gopath"
GOPRIVATE="github.com"
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"

Note: GO 111 MODULE must be turned on, if it is turned on, please google or Baidu to solve it

2、ztool toolkit installation
  1. Version requirements
go >=1.15 
  1. version check
go version 
  1. go get Install
go get -u -b github.com/druidcaesa/ztool
  1. go mod Install
require github.com/druidcaesa/ztool

三、Add bricks and mortar

1、branch description
branch illustrate
master The main branch, the release version uses the branch, the repository does not accept any pr fetch modifications
v1-dev Version v 1 development branch, this version accepts modification or pr
2、Bug fix or this piece of feedback channel
3、How to contribute code
  1. Fork the project to your own repo on Gitee or Github
  2. Clone the fork past project that is your project to your local
  3. Modify the code (remember to modify the v 1-dev branch)
  4. After commit, push to your own library (v 1-dev branch)
  5. Log in to Gitee or Github to see a pull request button on your homepage, click it, fill in some description information, and submit it.
  6. Waiting for the maintainer to merge
4、PR principles to follow

ZTool welcomes anyone to measure the growth of Z Tool and contribute their own code, but for the overall readability and maintenance of the project, it is necessary to comply with these specifications. The specifications are as follows:

  1. The annotations are complete, especially each new method should be marked with method description, parameter description, return value description and other information according to the Go document specification, and add the test method in the corresponding test file, if you like, you can also add your name.
  2. For the newly added method, please do not add dependencies to third-party libraries. In order to reduce dependencies on other libraries, Z Tool is introduced into third-party libraries.
  3. Please pull request to the v1-dev branch, the master is the main branch, and all tags are typed from the master branch. The master does not allow any modification, and all requests from pr will be closed directly.

Documentation

Overview

*

@author: fanyanan
@date: 2022/6/8
@note: //Tool registration calls API

*

Index

Constants

This section is empty.

Variables

View Source
var (
	// HttpUtils http client tool
	HttpUtils net.Client
	// DateUtils time manipulation tool
	DateUtils date.DateTime
	// EncryptionUtils Encryption and decryption tools
	EncryptionUtils encryption.Encryption
	// FileUtils file manipulation tool
	FileUtils file.ZFile
	// IdUtils tool package
	IdUtils id.Id
	//StrUtils String tools
	StrUtils str.Str
	// IDCardUtils People's Republic of China ID Card Verification Tool
	IDCardUtils idcard.Idcard
)

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
* @author: fanyanan @date: 2022/6/8 @note: date Toolkit common enumeration *
* @author: fanyanan @date: 2022/6/8 @note: date Toolkit common enumeration *
* @author: fanyanan @date: 2022/6/8 @note: //Time Manipulation Tool Setup Basics * * @author: fanyanan @date: 2022/6/8 @note: //time operation method * * @author: fanyanan @date: 2022/6/9 @note: //private action method *
* @author: fanyanan @date: 2022/6/8 @note: //Time Manipulation Tool Setup Basics * * @author: fanyanan @date: 2022/6/8 @note: //time operation method * * @author: fanyanan @date: 2022/6/9 @note: //private action method *
* @author: fanyanan @date: 2022/6/9 @note: //Aes Encryption and decryption tools * * @author: fanyanan @date: 2022/6/9 @note: //Encrypt and decrypt global public resource * * @author: fanyanan @date: 2022/6/9 @note: //DES Encryption and decryption * * @author: fanyanan @date: 2022/6/9 @note: //md5 Encryption and decryption tools *
* @author: fanyanan @date: 2022/6/9 @note: //Aes Encryption and decryption tools * * @author: fanyanan @date: 2022/6/9 @note: //Encrypt and decrypt global public resource * * @author: fanyanan @date: 2022/6/9 @note: //DES Encryption and decryption * * @author: fanyanan @date: 2022/6/9 @note: //md5 Encryption and decryption tools *
* @author: fanyanan @date: 2022/6/9 @note: //File manipulation public resources * * @author: fanyanan @date: 2022/6/9 @note: //file manipulation tool *
* @author: fanyanan @date: 2022/6/9 @note: //File manipulation public resources * * @author: fanyanan @date: 2022/6/9 @note: //file manipulation tool *
* @author: fanyanan @date: 2022/6/9 @note: //UUID base * * @author: fanyanan @date: 2022/6/9 @note: //id Tool Provides UUID generation method ObjectId generation method Snowflake's Id generation method * * @author: fanyanan @date: 2022/6/9 @note: //UUID Constructor * * @author: fanyanan @date: 2022/6/9 @note: //specific method * * @author: fanyanan @date: 2022/6/9 @note: //UUID Operation tool *
* @author: fanyanan @date: 2022/6/9 @note: //UUID base * * @author: fanyanan @date: 2022/6/9 @note: //id Tool Provides UUID generation method ObjectId generation method Snowflake's Id generation method * * @author: fanyanan @date: 2022/6/9 @note: //UUID Constructor * * @author: fanyanan @date: 2022/6/9 @note: //specific method * * @author: fanyanan @date: 2022/6/9 @note: //UUID Operation tool *
* @author: fanyanan @date: 2022/6/9 @note: //Common Algorithms for People's Republic of China ID Cards * * @author: fanyanan @date: 2022/6/9 @note: //People's Republic of China ID Card Verification *
* @author: fanyanan @date: 2022/6/9 @note: //Common Algorithms for People's Republic of China ID Cards * * @author: fanyanan @date: 2022/6/9 @note: //People's Republic of China ID Card Verification *
* @author: fanyanan @date: 2022/6/8 @note: //request operation interface * * @author: fanyanan @date: 2022/6/8 @note: //network request body *
* @author: fanyanan @date: 2022/6/8 @note: //request operation interface * * @author: fanyanan @date: 2022/6/8 @note: //network request body *
* @author: fanyanan @date: 2022/6/9 @note: //String manipulation constants and methods * * @author: fanyanan @date: 2022/6/9 @note: //character creation *
* @author: fanyanan @date: 2022/6/9 @note: //String manipulation constants and methods * * @author: fanyanan @date: 2022/6/9 @note: //character creation *

Jump to

Keyboard shortcuts

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