{"id":13511605,"url":"https://github.com/duke-git/lancet","last_synced_at":"2026-03-07T05:25:49.479Z","repository":{"id":37712994,"uuid":"432717637","full_name":"duke-git/lancet","owner":"duke-git","description":"A comprehensive, efficient, and reusable util function library of Go.","archived":false,"fork":false,"pushed_at":"2026-01-13T06:00:44.000Z","size":6147,"stargazers_count":5259,"open_issues_count":9,"forks_count":522,"subscribers_count":44,"default_branch":"main","last_synced_at":"2026-01-24T06:51:58.051Z","etag":null,"topics":["generics","go","golang","library","lodash","utils"],"latest_commit_sha":null,"homepage":"https://www.golancet.cn/en/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duke-git.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"liberapay":"Duke_Du","patreon":"DukeDu"}},"created_at":"2021-11-28T13:18:19.000Z","updated_at":"2026-01-24T01:51:49.000Z","dependencies_parsed_at":"2026-01-13T08:03:29.522Z","dependency_job_id":null,"html_url":"https://github.com/duke-git/lancet","commit_stats":{"total_commits":1310,"total_committers":55,"mean_commits":"23.818181818181817","dds":"0.22977099236641219","last_synced_commit":"213e2b4eadcfa9c459c89877e7e067bbf3176898"},"previous_names":[],"tags_count":99,"template":false,"template_full_name":null,"purl":"pkg:github/duke-git/lancet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duke-git%2Flancet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duke-git%2Flancet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duke-git%2Flancet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duke-git%2Flancet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duke-git","download_url":"https://codeload.github.com/duke-git/lancet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duke-git%2Flancet/sbom","scorecard":{"id":359415,"data":{"date":"2025-08-11","repo":{"name":"github.com/duke-git/lancet","commit":"6307d624cb35fcb4da801a2f8f13f4d9dade0058"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.4,"checks":[{"name":"Maintained","score":10,"reason":"17 commit(s) and 12 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/codecov.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":2,"reason":"Found 8/30 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codecov.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/duke-git/lancet/codecov.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codecov.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/duke-git/lancet/codecov.yml/main?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/codecov.yml:27","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: GoBuiltInFuzzer integration found: slice/slice_test.go:167"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-64vr-g452-qvp3","Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx","Warn: Project is vulnerable to: GHSA-vg6x-rcgg-rjx6","Warn: Project is vulnerable to: GHSA-x574-m823-4x7w","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T10:24:20.029Z","repository_id":37712994,"created_at":"2025-08-18T10:24:20.029Z","updated_at":"2025-08-18T10:24:20.029Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30208731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T05:23:27.321Z","status":"ssl_error","status_checked_at":"2026-03-07T05:00:17.256Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generics","go","golang","library","lodash","utils"],"created_at":"2024-08-01T03:00:59.657Z","updated_at":"2026-03-07T05:25:49.444Z","avatar_url":"https://github.com/duke-git.png","language":"Go","funding_links":["https://liberapay.com/Duke_Du","https://patreon.com/DukeDu"],"categories":["Utilities","公用事业公司","Go","Repositories","Text Processing","文本处理","Template Engines"],"sub_categories":["Utility/Miscellaneous","实用程序/Miscellaneous","Fail injection"],"readme":"\u003cdiv align=center\u003e\n\u003cimg src=\"./logo.png\" width=\"200\" height=\"200\"/\u003e\n\n\u003cbr/\u003e\n\n![Go version](https://img.shields.io/badge/go-%3E%3Dv1.18-9cf)\n[![Release](https://img.shields.io/badge/release-2.3.5-green.svg)](https://github.com/duke-git/lancet/releases)\n[![GoDoc](https://godoc.org/github.com/duke-git/lancet/v2?status.svg)](https://pkg.go.dev/github.com/duke-git/lancet/v2)\n[![Go Report Card](https://goreportcard.com/badge/github.com/duke-git/lancet/v2)](https://goreportcard.com/report/github.com/duke-git/lancet/v2)\n[![test](https://github.com/duke-git/lancet/actions/workflows/codecov.yml/badge.svg?branch=main\u0026event=push)](https://github.com/duke-git/lancet/actions/workflows/codecov.yml)\n[![codecov](https://codecov.io/gh/duke-git/lancet/branch/main/graph/badge.svg?token=FC48T1F078)](https://codecov.io/gh/duke-git/lancet)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/duke-git/lancet/blob/main/LICENSE)\n[![Gurubase](https://img.shields.io/badge/Gurubase-Ask%20Lancet%20Guru-006BFF)](https://gurubase.io/g/lancet)\n\n\u003c/div\u003e\n\n\u003cdiv STYLE=\"page-break-after: always;\"\u003e\u003c/div\u003e\n\n\u003cp style=\"font-size: 20px\"\u003e \n    Lancet is a comprehensive, efficient, and reusable util function library of go. Inspired by the java apache common package and lodash.js.\n\u003c/p\u003e\n\n## \u003ca href=\"https://www.golancet.cn/en/\" target=\"_blank\"\u003e Website\u003c/a\u003e | [简体中文](./README_zh-CN.md)\n\n## Features\n\n-   👏 Comprehensive, efficient and reusable.\n-   💪 700+ go util functions, support string, slice, datetime, net, crypt...\n-   💅 Only depends on two kinds of libraries: go standard library and golang.org/x.\n-   🌍 Unit test for every exported function.\n\n## Installation\n\n### Note:\n\n1. \u003cb\u003eFor users who use go1.18 and above, it is recommended to install lancet v2.x.x. Cause in v2.x.x all functions were rewritten with generics of go1.18.\u003c/b\u003e\n\n```go\ngo get github.com/duke-git/lancet/v2 // will install latest version of v2.x.x\n```\n\n2. \u003cb\u003eFor users who use version below go1.18, you should install v1.x.x. The latest of v1.x.x is v1.4.6. \u003c/b\u003e\n\n```go\ngo get github.com/duke-git/lancet // below go1.18, install latest version of v1.x.x\n```\n\n## Usage\n\nLancet organizes the code into package structure, and you need to import the corresponding package name when use it. For example, if you use string-related functions,import the strutil package like below:\n\n```go\nimport \"github.com/duke-git/lancet/v2/strutil\"\n```\n\n## Example\n\nHere takes the string function Reverse (reverse order string) as an example, and the strutil package needs to be imported.\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/duke-git/lancet/v2/strutil\"\n)\n\nfunc main() {\n    s := \"hello\"\n    rs := strutil.Reverse(s)\n    fmt.Println(rs) //olleh\n}\n```\n\n## Documentation\n\n### \u003cspan id=\"index\"\u003eIndex\u003cspan\u003e\n\n-   [Algorithm](#user-content-algorithm)\n-   [Compare](#user-content-compare)\n-   [Concurrency](#user-content-concurrency)\n-   [Condition](#user-content-condition)\n-   [Convertor](#user-content-convertor)\n-   [Cryptor](#user-content-cryptor)\n-   [Datetime](#user-content-datetime)\n-   [Datastructure](#user-content-datastructure)\n-   [Fileutil](#user-content-fileutil)\n-   [Formatter](#user-content-formatter)\n-   [Function](#user-content-function)\n-   [Maputil](#user-content-maputil)\n-   [Mathutil](#user-content-mathutil)\n-   [Netutil](#user-content-netutil)\n-   [Pointer](#user-content-pointer)\n-   [Random](#user-content-random)\n-   [Retry](#user-content-retry)\n-   [Slice](#user-content-slice)\n-   [Stream](#user-content-stream)\n-   [Structs](#user-content-structs)\n-   [Strutil](#user-content-strutil)\n-   [System](#user-content-system)\n-   [Tuple](#user-content-tuple)\n-   [Validator](#user-content-validator)\n-   [Xerror](#user-content-xerror)\n\n\u003ch3 id=\"algorithm\"\u003e1. Algorithm package implements some basic algorithm. eg. sort, search. \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e\u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/algorithm\"\n```\n\n#### Function list:\n\n-   **\u003cbig\u003eBubbleSort\u003c/big\u003e** : sorts slice with bubble sort algorithm, will change the original slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/algorithm.md#BubbleSort)]\n    [[play](https://go.dev/play/p/GNdv7Jg2Taj)]\n-   **\u003cbig\u003eCountSort\u003c/big\u003e** : sorts slice with bubble sort algorithm, don't change original slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/algorithm.md#CountSort)]\n    [[play](https://go.dev/play/p/tB-Umgm0DrP)]\n-   **\u003cbig\u003eHeapSort\u003c/big\u003e** : sorts slice with heap sort algorithm, will change the original slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/algorithm.md#HeapSort)]\n    [[play](https://go.dev/play/p/u6Iwa1VZS_f)]\n-   **\u003cbig\u003eInsertionSort\u003c/big\u003e** : sorts slice with insertion sort algorithm, will change the original slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/algorithm.md#InsertionSort)]\n    [[play](https://go.dev/play/p/G5LJiWgJJW6)]\n-   **\u003cbig\u003eMergeSort\u003c/big\u003e** : sorts slice with merge sort algorithm, will change the original slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/algorithm.md#MergeSort)]\n    [[play](https://go.dev/play/p/ydinn9YzUJn)]\n-   **\u003cbig\u003eQuickSort\u003c/big\u003e** : sorts slice with quick sort algorithm, will change the original slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/algorithm.md#QuickSort)]\n    [[play](https://go.dev/play/p/7Y7c1Elk3ax)]\n-   **\u003cbig\u003eSelectionSort\u003c/big\u003e** : sorts slice with selection sort algorithm, will change the original slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/algorithm.md#SelectionSort)]\n    [[play](https://go.dev/play/p/oXovbkekayS)]\n-   **\u003cbig\u003eShellSort\u003c/big\u003e** : sorts slice with shell sort algorithm, will change the original slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/algorithm.md#ShellSort)]\n    [[play](https://go.dev/play/p/3ibkszpJEu3)]\n-   **\u003cbig\u003eBinarySearch\u003c/big\u003e** : returns the index of target within a sorted slice, use binary search (recursive call itself).\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/algorithm.md#BinarySearch)]\n    [[play](https://go.dev/play/p/t6MeGiUSN47)]\n-   **\u003cbig\u003eBinaryIterativeSearch\u003c/big\u003e** : returns the index of target within a sorted slice, use binary search (no recursive).\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/algorithm.md#BinaryIterativeSearch)]\n    [[play](https://go.dev/play/p/Anozfr8ZLH3)]\n-   **\u003cbig\u003eLinearSearch\u003c/big\u003e** : returns the index of target in slice base on equal function.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/algorithm.md#LinearSearch)]\n    [[play](https://go.dev/play/p/IsS7rgn5s3x)]\n-   **\u003cbig\u003eLRUCache\u003c/big\u003e** : implements memory cache with lru algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/algorithm.md#LRUCache)]\n    [[play](https://go.dev/play/p/-EZjgOURufP)]\n\n\u003ch3 id=\"compare\"\u003e 2. Compare package provides a lightweight comparison function on any type. \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e \u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/compare\"\n```\n\n#### Function list:\n\n-   **\u003cbig\u003eEqual\u003c/big\u003e** : Checks if two values are equal or not. (check both type and value)\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/compare.md#Equal)]\n    [[play](https://go.dev/play/p/wmVxR-to4lz)]\n-   **\u003cbig\u003eEqualValue\u003c/big\u003e** : Checks if two values are equal or not. (check value only)\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/compare.md#EqualValue)]\n    [[play](https://go.dev/play/p/fxnna_LLD9u)]\n-   **\u003cbig\u003eLessThan\u003c/big\u003e** : Checks if value `left` less than value `right`.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/compare.md#LessThan)]\n    [[play](https://go.dev/play/p/cYh7FQQj0ne)]\n-   **\u003cbig\u003eGreaterThan\u003c/big\u003e** : Checks if value `left` greater than value `right`.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/compare.md#GreaterThan)]\n    [[play](https://go.dev/play/p/9-NYDFZmIMp)]\n-   **\u003cbig\u003eLessOrEqual\u003c/big\u003e** : Checks if value `left` less than or equal than value `right`.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/compare.md#LessOrEqual)]\n    [[play](https://go.dev/play/p/e4T_scwoQzp)]\n-   **\u003cbig\u003eGreaterOrEqual\u003c/big\u003e** : Checks if value `left` less greater or equal than value `right`.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/compare.md#GreaterOrEqual)]\n    [[play](https://go.dev/play/p/vx8mP0U8DFk)]\n-   **\u003cbig\u003eInDelta\u003c/big\u003e** : Checks if two values are equal or not within a delta.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/compare.md#InDelta)]\n\n\u003ch3 id=\"concurrency\"\u003e 3. Concurrency package contain some functions to support concurrent programming. eg, goroutine, channel, async. \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e \u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/concurrency\"\n```\n\n#### Function list:\n\n-   **\u003cbig\u003eNewChannel\u003c/big\u003e** : create a Channel pointer instance.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/concurrency.md#NewChannel)]\n    [[play](https://go.dev/play/p/7aB4KyMMp9A)]\n-   **\u003cbig\u003eBridge\u003c/big\u003e** : link multiply channels into one channel.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/Bridge.md#NewChannel)]\n    [[play](https://go.dev/play/p/qmWSy1NVF-Y)]\n-   **\u003cbig\u003eFanIn\u003c/big\u003e** : merge multiple channels into one channel.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/concurrency.md#FanIn)]\n    [[play](https://go.dev/play/p/2VYFMexEvTm)]\n-   **\u003cbig\u003eGenerate\u003c/big\u003e** : creates a channel, then put values into the channel.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/concurrency.md#Generate)]\n    [[play](https://go.dev/play/p/7aB4KyMMp9A)]\n-   **\u003cbig\u003eOr\u003c/big\u003e** : read one or more channels into one channel, will close when any readin channel is closed.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/concurrency.md#Or)]\n    [[play](https://go.dev/play/p/Wqz9rwioPww)]\n-   **\u003cbig\u003eOrDone\u003c/big\u003e** : read a channel into another channel, will close until cancel context.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/concurrency.md#OrDone)]\n    [[play](https://go.dev/play/p/lm_GoS6aDjo)]\n-   **\u003cbig\u003eRepeat\u003c/big\u003e** : create channel, put values into the channel repeatedly until cancel the context.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/concurrency.md#Repeat)]\n    [[play](https://go.dev/play/p/k5N_ALVmYjE)]\n-   **\u003cbig\u003eRepeatFn\u003c/big\u003e** : create a channel, executes fn repeatedly, and put the result into the channel, until close context.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/concurrency.md#RepeatFn)]\n    [[play](https://go.dev/play/p/4J1zAWttP85)]\n-   **\u003cbig\u003eTake\u003c/big\u003e** : create a channel whose values are taken from another channel with limit number.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/concurrency.md#Take)]\n    [[play](https://go.dev/play/p/9Utt-1pDr2J)]\n-   **\u003cbig\u003eTee\u003c/big\u003e** : split one chanel into two channels, until cancel the context.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/concurrency.md#Tee)]\n    [[play](https://go.dev/play/p/3TQPKnCirrP)]\n\n\u003ch3 id=\"condition\"\u003e 4. Condition package contains some functions for conditional judgment. eg. And, Or, TernaryOperator...\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e \u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/condition\"\n```\n\n#### Function list:\n\n-   **\u003cbig\u003eBool\u003c/big\u003e** : returns the truthy value of anything.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/condition.md#Bool)]\n    [[play](https://go.dev/play/p/ETzeDJRSvhm)]\n-   **\u003cbig\u003eAnd\u003c/big\u003e** : returns true if both a and b are truthy.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/condition.md#And)]\n    [[play](https://go.dev/play/p/W1SSUmt6pvr)]\n-   **\u003cbig\u003eOr\u003c/big\u003e** : returns false if neither a nor b is truthy.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/condition.md#Or)]\n    [[play](https://go.dev/play/p/UlQTxHaeEkq)]\n-   **\u003cbig\u003eXor\u003c/big\u003e** : returns true if a or b but not both is truthy.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/condition.md#Xor)]\n    [[play](https://go.dev/play/p/gObZrW7ZbG8)]\n-   **\u003cbig\u003eNor\u003c/big\u003e** : returns true if neither a nor b is truthy.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/condition.md#Nor)]\n    [[play](https://go.dev/play/p/g2j08F_zZky)]\n-   **\u003cbig\u003eXnor\u003c/big\u003e** : returns true if both a and b or neither a nor b are truthy.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/condition.md#Xnor)]\n    [[play](https://go.dev/play/p/OuDB9g51643)]\n-   **\u003cbig\u003eNand\u003c/big\u003e** : returns false if both a and b are truthy.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/condition.md#Nand)]\n    [[play](https://go.dev/play/p/vSRMLxLIbq8)]\n-   **\u003cbig\u003eTernaryOperator\u003c/big\u003e** : ternary operator.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/condition.md#TernaryOperator)]\n    [[play](https://go.dev/play/p/ElllPZY0guT)]\n\n\u003ch3 id=\"convertor\"\u003e 5. Convertor package contains some functions for data conversion. \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e \u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/convertor\"\n```\n\n#### Function list:\n\n-   **\u003cbig\u003eColorHexToRGB\u003c/big\u003e** : convert color hex to color rgb.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ColorHexToRGB)]\n    [[play](https://go.dev/play/p/o7_ft-JCJBV)]\n-   **\u003cbig\u003eColorRGBToHex\u003c/big\u003e** : convert rgb color to hex color.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ColorRGBToHex)]\n    [[play](https://go.dev/play/p/nzKS2Ro87J1)]\n-   **\u003cbig\u003eToBool\u003c/big\u003e** : convert string to bool.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ToBool)]\n    [[play](https://go.dev/play/p/ARht2WnGdIN)]\n-   **\u003cbig\u003eToBytes\u003c/big\u003e** : convert value to byte slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ToBytes)]\n    [[play](https://go.dev/play/p/fAMXYFDvOvr)]\n-   **\u003cbig\u003eToChar\u003c/big\u003e** : convert string to char slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ToChar)]\n    [[play](https://go.dev/play/p/JJ1SvbFkVdM)]\n-   **\u003cbig\u003eToChannel\u003c/big\u003e** : convert a collection of elements to a read-only channel.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ToChannel)]\n    [[play](https://go.dev/play/p/hOx_oYZbAnL)]\n-   **\u003cbig\u003eToFloat\u003c/big\u003e** : convert value to float64, if param is a invalid floatable, will return 0.0 and error.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ToFloat)]\n    [[play](https://go.dev/play/p/4YTmPCibqHJ)]\n-   **\u003cbig\u003eToInt\u003c/big\u003e** : convert value to int64 value, if input is not numerical, return 0 and error.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ToInt)]\n    [[play](https://go.dev/play/p/9_h9vIt-QZ_b)]\n-   **\u003cbig\u003eToJson\u003c/big\u003e** : convert value to a json string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ToJson)]\n    [[play](https://go.dev/play/p/2rLIkMmXWvR)]\n-   **\u003cbig\u003eToMap\u003c/big\u003e** : convert a slice of structs to a map based on iteratee function.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ToMap)]\n    [[play](https://go.dev/play/p/tVFy7E-t24l)]\n-   **\u003cbig\u003eToPointer\u003c/big\u003e** : return a pointer of passed value.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ToPointer)]\n    [[play](https://go.dev/play/p/ASf_etHNlw1)]\n-   **\u003cbig\u003eToString\u003c/big\u003e** : convert value to string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ToString)]\n    [[play](https://go.dev/play/p/nF1zOOslpQq)]\n-   **\u003cbig\u003eStructToMap\u003c/big\u003e** : convert struct to map, only convert exported struct field.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#StructToMap)]\n    [[play](https://go.dev/play/p/KYGYJqNUBOI)]\n-   **\u003cbig\u003eMapToSlice\u003c/big\u003e** : convert map to slice based on iteratee function.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#MapToSlice)]\n    [[play](https://go.dev/play/p/dmX4Ix5V6Wl)]\n-   **\u003cbig\u003eEncodeByte\u003c/big\u003e** : encode data to byte slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#EncodeByte)]\n    [[play](https://go.dev/play/p/DVmM1G5JfuP)]\n-   **\u003cbig\u003eDecodeByte\u003c/big\u003e** : decode byte slice data to target object.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#DecodeByte)]\n    [[play](https://go.dev/play/p/zI6xsmuQRbn)]\n-   **\u003cbig\u003eDeepClone\u003c/big\u003e** : creates a deep copy of passed item, can't clone unexported field of struct.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#DeepClone)]\n    [[play](https://go.dev/play/p/j4DP5dquxnk)]\n-   **\u003cbig\u003eCopyProperties\u003c/big\u003e** : copies each field from the source struct into the destination struct.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#CopyProperties)]\n    [[play](https://go.dev/play/p/oZujoB5Sgg5)]\n-   **\u003cbig\u003eToInterface\u003c/big\u003e** : converts reflect value to its interface type.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ToInterface)]\n    [[play](https://go.dev/play/p/syqw0-WG7Xd)]\n-   **\u003cbig\u003eUtf8ToGbk\u003c/big\u003e** : converts utf8 encoding data to GBK encoding data\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#Utf8ToGbk)]\n    [[play](https://go.dev/play/p/9FlIaFLArIL)]\n-   **\u003cbig\u003eGbkToUtf8\u003c/big\u003e** : converts GBK encoding data to utf8 encoding data.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#GbkToUtf8)]\n    [[play](https://go.dev/play/p/OphmHCN_9u8)]\n-   **\u003cbig\u003eToStdBase64\u003c/big\u003e** : converts a value to a string encoded in standard Base64.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ToStdBase64)]\n    [[play](https://go.dev/play/p/_fLJqJD3NMo)]\n-   **\u003cbig\u003eToUrlBase64\u003c/big\u003e** : converts a value to a string encoded in url Base64.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ToUrlBase64)]\n    [[play](https://go.dev/play/p/C_d0GlvEeUR)]\n-   **\u003cbig\u003eToRawStdBase64\u003c/big\u003e** : converts a value to a string encoded in raw standard Base64.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ToRawStdBase64)]\n    [[play](https://go.dev/play/p/wSAr3sfkDcv)]\n-   **\u003cbig\u003eToRawUrlBase64\u003c/big\u003e** : converts a value to a string encoded in raw url Base64.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ToRawUrlBase64)]\n    [[play](https://go.dev/play/p/HwdDPFcza1O)]\n-   **\u003cbig\u003eToBigInt\u003c/big\u003e** : converts an integer of any supported type (int, int64, uint64, etc.) to *big.Int.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/convertor.md#ToBigInt)]\n    [[play](https://go.dev/play/p/X3itkCxwB_x)]\n\n\u003ch3 id=\"cryptor\"\u003e 6. Cryptor package is for data encryption and decryption.\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e\u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/cryptor\"\n```\n\n#### Function list:\n\n-   **\u003cbig\u003eAesEcbEncrypt\u003c/big\u003e** : encrypt byte slice data with key use AES ECB algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#AesEcbEncrypt)]\n    [[play](https://go.dev/play/p/zI6xsmuQRbn)]\n-   **\u003cbig\u003eAesEcbDecrypt\u003c/big\u003e** : decrypt byte slice data with key use AES ECB algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#AesEcbDecrypt)]\n    [[play](https://go.dev/play/p/zI6xsmuQRbn)]\n-   **\u003cbig\u003eAesCbcEncrypt\u003c/big\u003e** : encrypt byte slice data with key use AES CBC algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#AesCbcEncrypt)]\n    [[play](https://go.dev/play/p/IOq_g8_lKZD)]\n-   **\u003cbig\u003eAesCbcDecrypt\u003c/big\u003e** : decrypt byte slice data with key use AES CBC algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#AesCbcDecrypt)]\n    [[play](https://go.dev/play/p/IOq_g8_lKZD)]\n-   **\u003cbig\u003eAesCtrCrypt\u003c/big\u003e** : encrypt/ decrypt byte slice data with key use AES CRC algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#AesCtrCrypt)]\n    [[play](https://go.dev/play/p/SpaZO0-5Nsp)]\n-   **\u003cbig\u003eAesCfbEncrypt\u003c/big\u003e** : encrypt byte slice data with key use AES CFB algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#AesCfbEncrypt)]\n    [[play](https://go.dev/play/p/tfkF10B13kH)]\n-   **\u003cbig\u003eAesCfbDecrypt\u003c/big\u003e** : decrypt byte slice data with key use AES CFB algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#AesCfbDecrypt)]\n    [[play](https://go.dev/play/p/tfkF10B13kH)]\n-   **\u003cbig\u003eAesOfbEncrypt\u003c/big\u003e** : encrypt byte slice data with key use AES OFB algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#AesOfbEncrypt)]\n    [[play](https://go.dev/play/p/VtHxtkUj-3F)]\n-   **\u003cbig\u003eAesOfbDecrypt\u003c/big\u003e** : decrypt byte slice data with key use AES OFB algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#AesOfbDecrypt)]\n    [[play](https://go.dev/play/p/VtHxtkUj-3F)]\n-   **\u003cbig\u003eAesGcmEncrypt\u003c/big\u003e** : encrypt byte slice data with key use AES GCM algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#AesGcmEncrypt)]\n    [[play](https://go.dev/play/p/rUt0-DmsPCs)]\n-   **\u003cbig\u003eAesGcmDecrypt\u003c/big\u003e** : decrypt byte slice data with key use AES GCM algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#AesGcmDecrypt)]\n    [[play](https://go.dev/play/p/rUt0-DmsPCs)]\n-   **\u003cbig\u003eBase64StdEncode\u003c/big\u003e** : encode string with base64 encoding.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#Base64StdEncode)]\n    [[play](https://go.dev/play/p/VOaUyQUreoK)]\n-   **\u003cbig\u003eBase64StdDecode\u003c/big\u003e** : decode string with base64 encoding.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#Base64StdDecode)]\n    [[play](https://go.dev/play/p/RWQylnJVgIe)]\n-   **\u003cbig\u003eDesEcbEncrypt\u003c/big\u003e** : encrypt byte slice data with key use DES ECB algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#DesEcbEncrypt)]\n    [[play](https://go.dev/play/p/8qivmPeZy4P)]\n-   **\u003cbig\u003eDesEcbDecrypt\u003c/big\u003e** : decrypt byte slice data with key use DES ECB algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#DesEcbDecrypt)]\n    [[play](https://go.dev/play/p/8qivmPeZy4P)]\n-   **\u003cbig\u003eDesCbcEncrypt\u003c/big\u003e** : encrypt byte slice data with key use DES CBC algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#DesCbcEncrypt)]\n    [[play](https://go.dev/play/p/4cC4QvWfe3_1)]\n-   **\u003cbig\u003eDesCbcDecrypt\u003c/big\u003e** : decrypt byte slice data with key use DES CBC algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#DesCbcDecrypt)]\n    [[play](https://go.dev/play/p/4cC4QvWfe3_1)]\n-   **\u003cbig\u003eDesCtrCrypt\u003c/big\u003e** : encrypt/decrypt byte slice data with key use DES CRY algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#DesCtrCrypt)]\n    [[play](https://go.dev/play/p/9-T6OjKpcdw)]\n-   **\u003cbig\u003eDesCfbEncrypt\u003c/big\u003e** : encrypt byte slice data with key use DES CFB algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#DesCfbEncrypt)]\n    [[play](https://go.dev/play/p/y-eNxcFBlxL)]\n-   **\u003cbig\u003eDesCfbDecrypt\u003c/big\u003e** : decrypt byte slice data with key use DES CFB algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#DesCfbDecrypt)]\n    [[play](https://go.dev/play/p/y-eNxcFBlxL)]\n-   **\u003cbig\u003eDesOfbEncrypt\u003c/big\u003e** : encrypt byte slice data with key use DES OFB algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#DesOfbEncrypt)]\n    [[play](https://go.dev/play/p/74KmNadjN1J)]\n-   **\u003cbig\u003eDesOfbDecrypt\u003c/big\u003e** : decrypt byte slice data with key use DES OFB algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#DesOfbDecrypt)]\n    [[play](https://go.dev/play/p/74KmNadjN1J)]\n-   **\u003cbig\u003eHmacMd5\u003c/big\u003e** : return the md5 hmac hash of string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#HmacMd5)]\n    [[play](https://go.dev/play/p/uef0q1fz53I)]\n-   **\u003cbig\u003eHmacMd5WithBase64\u003c/big\u003e** : return the md5 hmac hash of base64 string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#HmacMd5WithBase64)]\n-   **\u003cbig\u003eHmacSha1\u003c/big\u003e** : return the hmac hash of string use sha1.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#HmacSha1)]\n    [[play](https://go.dev/play/p/1UI4oQ4WXKM)]\n-   **\u003cbig\u003eHmacSha1WithBase64\u003c/big\u003e** : return the hmac hash of string use sha1 with base64.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#HmacSha1WithBase64)]\n    [[play](https://go.dev/play/p/47JmmGrnF7B)]\n-   **\u003cbig\u003eHmacSha256\u003c/big\u003e** : return the hmac hash of string use sha256.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#HmacSha256)]\n    [[play](https://go.dev/play/p/HhpwXxFhhC0)]\n-   **\u003cbig\u003eHmacSha256WithBase64\u003c/big\u003e** : return the hmac hash of string use sha256 with base64.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#HmacSha256WithBase64)]\n    [[play](https://go.dev/play/p/EKbkUvPTLwO)]\n-   **\u003cbig\u003eHmacSha512\u003c/big\u003e** : return the hmac hash of string use sha512.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#HmacSha512)]\n    [[play](https://go.dev/play/p/59Od6m4A0Ud)]\n-   **\u003cbig\u003eHmacSha512WithBase64\u003c/big\u003e** : return the hmac hash of string use sha512 with base64.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#HmacSha512WithBase64)]\n    [[play](https://go.dev/play/p/c6dSe3E2ydU)]\n-   **\u003cbig\u003eMd5Byte\u003c/big\u003e** : return the md5 string of byte slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#Md5Byte)]\n    [[play](https://go.dev/play/p/suraalH8lyC)]\n-   **\u003cbig\u003eMd5ByteWithBase64\u003c/big\u003e** : return the md5 string of byte slice with base64.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#Md5ByteWithBase64)]\n    [[play](https://go.dev/play/p/Tcb-Z7LN2ax)]\n-   **\u003cbig\u003eMd5String\u003c/big\u003e** : return the md5 value of string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#Md5String)]\n    [[play](https://go.dev/play/p/1bLcVetbTOI)]\n-   **\u003cbig\u003eMd5StringWithBase64\u003c/big\u003e** : return the md5 value of string with base64.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#Md5StringWithBase64)]\n    [[play](https://go.dev/play/p/Lx4gH7Vdr5_y)]\n-   **\u003cbig\u003eMd5File\u003c/big\u003e** : return the md5 value of file.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#Md5File)]\n-   **\u003cbig\u003eSha1\u003c/big\u003e** : return the sha1 value (SHA-1 hash algorithm) of base64 string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#Sha1)]\n    [[play](https://go.dev/play/p/_m_uoD1deMT)]\n-   **\u003cbig\u003eSha1WithBase64\u003c/big\u003e** : return the sha1 value (SHA-1 hash algorithm) of string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#Sha1WithBase64)]\n    [[play](https://go.dev/play/p/fSyx-Gl2l2-)]\n-   **\u003cbig\u003eSha256\u003c/big\u003e** : return the sha256 value (SHA-256 hash algorithm) of string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#Sha256)]\n    [[play](https://go.dev/play/p/tU9tfBMIAr1)]\n-   **\u003cbig\u003eSha256WithBase64\u003c/big\u003e** : return the sha256 value (SHA256 hash algorithm) of base64 string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#Sha256WithBase64)]\n    [[play](https://go.dev/play/p/85IXJHIal1k)]\n-   **\u003cbig\u003eSha512\u003c/big\u003e** : return the sha512 value (SHA-512 hash algorithm) of string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#Sha512)]\n    [[play](https://go.dev/play/p/3WsvLYZxsHa)]\n-   **\u003cbig\u003eSha512WithBase64\u003c/big\u003e** : return the sha512 value (SHA-512 hash algorithm) of base64 string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#Sha512WithBase64)]\n    [[play](https://go.dev/play/p/q_fY2rA-k5I)]\n-   **\u003cbig\u003eGenerateRsaKey\u003c/big\u003e** : create rsa private and public pemo file.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#GenerateRsaKey)]\n    [[play](https://go.dev/play/p/zutRHrDqs0X)]\n-   **\u003cbig\u003eRsaEncrypt\u003c/big\u003e** : encrypt data with ras algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#RsaEncrypt)]\n    [[play](https://go.dev/play/p/7_zo6mrx-eX)]\n-   **\u003cbig\u003eRsaDecrypt\u003c/big\u003e** : decrypt data with ras algorithm.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#RsaDecrypt)]\n    [[play](https://go.dev/play/p/7_zo6mrx-eX)]\n-   **\u003cbig\u003eGenerateRsaKeyPair\u003c/big\u003e** : creates rsa private and public key.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#GenerateRsaKeyPair)]\n    [[play](https://go.dev/play/p/sSVmkfENKMz)]\n-   **\u003cbig\u003eRsaEncryptOAEP\u003c/big\u003e** : encrypts the given data with RSA-OAEP.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#RsaEncryptOAEP)]\n    [[play](https://go.dev/play/p/sSVmkfENKMz)]\n-   **\u003cbig\u003eRsaDecryptOAEP\u003c/big\u003e** : decrypts the data with RSA-OAEP\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#RsaDecryptOAEP)]\n    [[play](https://go.dev/play/p/sSVmkfENKMz)]\n-   **\u003cbig\u003eRsaSign\u003c/big\u003e** : signs the data with RSA.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#RsaSign)]\n    [[play](https://go.dev/play/p/qhsbf8BJ6Mf)]\n-   **\u003cbig\u003eRsaVerifySign\u003c/big\u003e** : verifies the signature of the data with RSA.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/cryptor.md#RsaVerifySign)]\n    [[play](https://go.dev/play/p/qhsbf8BJ6Mf)]\n\n\u003ch3 id=\"datetime\"\u003e 7. Datetime package supports date and time format and compare. \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e\u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/datetime\"\n```\n\n#### Function list:\n\n-   **\u003cbig\u003eAddDay\u003c/big\u003e** : add or sub day to the time.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#AddDay)]\n    [[play](https://go.dev/play/p/dIGbs_uTdFa)]\n-   **\u003cbig\u003eAddHour\u003c/big\u003e** : add or sub day to the time.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#AddHour)]\n    [[play](https://go.dev/play/p/rcMjd7OCsi5)]\n-   **\u003cbig\u003eAddMinute\u003c/big\u003e** : add or sub day to the time.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#AddMinute)]\n    [[play](https://go.dev/play/p/nT1heB1KUUK)]\n-   **\u003cbig\u003eAddWeek\u003c/big\u003e** : add or sub week to time.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#AddWeek)]\n    [[play](https://go.dev/play/p/M9TqdMiaA2p)]\n-   **\u003cbig\u003eAddMonth\u003c/big\u003e** : add or sub months to time.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#AddMonth)]\n    [[play](https://go.dev/play/p/DLoiOnpLvsN)]\n-   **\u003cbig\u003eAddYear\u003c/big\u003e** : add or sub year to the time.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#AddYear)]\n    [[play](https://go.dev/play/p/MqW2ujnBx10)]\n-   **\u003cbig\u003eAddDaySafe\u003c/big\u003e** : add or sub days to the time and ensure that the returned date does not exceed the valid date of the target year and month.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#AddDaySafe)]\n    [[play](https://go.dev/play/p/JTohZFpoDJ3)]\n-   **\u003cbig\u003eAddMonthSafe\u003c/big\u003e** : add or sub months to the time and ensure that the returned date does not exceed the valid date of the target year and month.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#AddMonthSafe)]\n    [[play](https://go.dev/play/p/KLw0lo6mbVW)]\n-   **\u003cbig\u003eAddYearSafe\u003c/big\u003e** : Add or sub years to the time and ensure that the returned date does not exceed the valid date of the target year and month.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#AddYearSafe)]\n    [[play](https://go.dev/play/p/KVGXWZZ54ZH)]\n-   **\u003cbig\u003eBeginOfMinute\u003c/big\u003e** : return the date time at the begin of minute of specific date.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#BeginOfMinute)]\n    [[play](https://go.dev/play/p/ieOLVJ9CiFT)]\n-   **\u003cbig\u003eBeginOfHour\u003c/big\u003e** : return the date time at the begin of hour of specific date.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#BeginOfHour)]\n    [[play](https://go.dev/play/p/GhdGFnDWpYs)]\n-   **\u003cbig\u003eBeginOfDay\u003c/big\u003e** : return the date time at the begin of day of specific date.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#BeginOfDay)]\n    [[play](https://go.dev/play/p/94m_UT6cWs9)]\n-   **\u003cbig\u003eBeginOfWeek\u003c/big\u003e** : return the date time at the begin of week of specific date.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#BeginOfWeek)]\n    [[play](https://go.dev/play/p/DCHdcL6gnfV)]\n-   **\u003cbig\u003eBeginOfMonth\u003c/big\u003e** : return the date time at the begin of month of specific date.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#BeginOfMonth)]\n    [[play](https://go.dev/play/p/bWXVFsmmzwL)]\n-   **\u003cbig\u003eBeginOfYear\u003c/big\u003e** : return the date time at the begin of year of specific date.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#BeginOfYear)]\n    [[play](https://go.dev/play/p/i326DSwLnV8)]\n-   **\u003cbig\u003eEndOfMinute\u003c/big\u003e** : return the date time at the end of minute of specific date.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#EndOfMinute)]\n    [[play](https://go.dev/play/p/yrL5wGzPj4z)]\n-   **\u003cbig\u003eEndOfHour\u003c/big\u003e** : return the date time at the end of hour of specific date.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#EndOfHour)]\n    [[play](https://go.dev/play/p/6ce3j_6cVqN)]\n-   **\u003cbig\u003eEndOfDay\u003c/big\u003e** : return the date time at the end of day of specific date.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#EndOfDay)]\n    [[play](https://go.dev/play/p/eMBOvmq5Ih1)]\n-   **\u003cbig\u003eEndOfWeek\u003c/big\u003e** : return the date time at the end of week of specific date.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#EndOfWeek)]\n    [[play](https://go.dev/play/p/mGSA162YgX9)]\n-   **\u003cbig\u003eEndOfMonth\u003c/big\u003e** : return the date time at the end of month of specific date.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#EndOfMonth)]\n    [[play](https://go.dev/play/p/_GWh10B3Nqi)]\n-   **\u003cbig\u003eEndOfYear\u003c/big\u003e** : return the date time at the end of year of specific date.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#EndOfYear)]\n    [[play](https://go.dev/play/p/G01cKlMCvNm)]\n-   **\u003cbig\u003eGetNowDate\u003c/big\u003e** : return format yyyy-mm-dd of current date.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#GetNowDate)]\n    [[play](https://go.dev/play/p/PvfkPpcpBBf)]\n-   **\u003cbig\u003eGetNowTime\u003c/big\u003e** : return format hh-mm-ss of current time.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#GetNowTime)]\n    [[play](https://go.dev/play/p/l7BNxCkTmJS)]\n-   **\u003cbig\u003eGetNowDateTime\u003c/big\u003e** : return format yyyy-mm-dd hh-mm-ss of current datetime.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#GetNowDateTime)]\n    [[play](https://go.dev/play/p/pI4AqngD0al)]\n-   **\u003cbig\u003eGetTodayStartTime\u003c/big\u003e** : return the start time of today, format: yyyy-mm-dd 00:00:00.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#GetTodayStartTime)]\n    [[play](https://go.dev/play/p/84siyYF7t99)]\n-   **\u003cbig\u003eGetTodayEndTime\u003c/big\u003e** : return the end time of today, format: yyyy-mm-dd 23:59:59.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#GetTodayEndTime)]\n    [[play](https://go.dev/play/p/jjrLnfoqgn3)]\n-   **\u003cbig\u003eGetZeroHourTimestamp\u003c/big\u003e** : return timestamp of zero hour (timestamp of 00:00).\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#GetZeroHourTimestamp)]\n    [[play](https://go.dev/play/p/QmL2oIaGE3q)]\n-   **\u003cbig\u003eGetNightTimestamp\u003c/big\u003e** : return timestamp of zero hour (timestamp of 23:59).\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#GetNightTimestamp)]\n    [[play](https://go.dev/play/p/UolysR3MYP1)]\n-   **\u003cbig\u003eFormatTimeToStr\u003c/big\u003e** : convert time to string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#FormatTimeToStr)]\n    [[play](https://go.dev/play/p/_Ia7M8H_OvE)]\n-   **\u003cbig\u003eFormatStrToTime\u003c/big\u003e** : convert string to time.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#FormatStrToTime)]\n    [[play](https://go.dev/play/p/1h9FwdU8ql4)]\n-   **\u003cbig\u003eNewUnix\u003c/big\u003e** : return unix timestamp of specific time.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#NewUnix)]\n    [[play](https://go.dev/play/p/psoSuh_kLRt)]\n-   **\u003cbig\u003eNewUnixNow\u003c/big\u003e** : return unix timestamp of current time.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#NewUnixNow)]\n    [[play](https://go.dev/play/p/U4PPx-9D0oz)]\n-   **\u003cbig\u003eNewFormat\u003c/big\u003e** : return unix timestamp of specific time string, t should be \"yyyy-mm-dd hh:mm:ss\".\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#NewFormat)]\n    [[play](https://go.dev/play/p/VkW08ZOaXPZ)]\n-   **\u003cbig\u003eNewISO8601\u003c/big\u003e** : return unix timestamp of specific iso8601 time string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#NewISO8601)]\n    [[play](https://go.dev/play/p/mkhOHQkdeA2)]\n-   **\u003cbig\u003eToUnix\u003c/big\u003e** : return unix timestamp.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#ToUnix)]\n    [[play](https://go.dev/play/p/_LUiwAdocjy)]\n-   **\u003cbig\u003eToFormat\u003c/big\u003e** : return the time string 'yyyy-mm-dd hh:mm:ss' of unix time.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#ToFormat)]\n    [[play](https://go.dev/play/p/VkW08ZOaXPZ)]\n-   **\u003cbig\u003eToFormatForTpl\u003c/big\u003e** : return the time string which format is specific tpl.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#ToFormatForTpl)]\n    [[play](https://go.dev/play/p/nyXxXcQJ8L5)]\n-   **\u003cbig\u003eToIso8601\u003c/big\u003e** : return iso8601 time string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#ToIso8601)]\n    [[play](https://go.dev/play/p/mkhOHQkdeA2)]\n-   **\u003cbig\u003eIsLeapYear\u003c/big\u003e** : check if param `year` is leap year or not.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#IsLeapYear)]\n    [[play](https://go.dev/play/p/xS1eS2ejGew)]\n-   **\u003cbig\u003eBetweenSeconds\u003c/big\u003e** : returns the number of seconds between two times.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#BetweenSeconds)]\n    [[play](https://go.dev/play/p/n3YDRyfyXJu)]\n-   **\u003cbig\u003eDayOfYear\u003c/big\u003e** : returns which day of the year the parameter date `t` is.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#DayOfYear)]\n    [[play](https://go.dev/play/p/0hjqhTwFNlH)]\n-   **\u003cbig\u003eIsWeekend\u003c/big\u003e** : checks if passed time is weekend or not.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#IsWeekend)]\n    [[play](https://go.dev/play/p/cupRM5aZOIY)]\n-   **\u003cbig\u003eNowDateOrTime\u003c/big\u003e** : returns current datetime with specific format and timezone.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#NowDateOrTime)]\n    [[play](https://go.dev/play/p/EZ-begEjtT0)]\n-   **\u003cbig\u003eTimestamp\u003c/big\u003e** : returns current second timestamp.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#Timestamp)]\n-   **\u003cbig\u003eTimestampMilli\u003c/big\u003e** : returns current mill second timestamp.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#TimestampMilli)]\n    [[play](https://go.dev/play/p/4gvEusOTu1T)]\n-   **\u003cbig\u003eTimestampMicro\u003c/big\u003e** : returns current micro second timestamp.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#TimestampMicro)]\n    [[play](https://go.dev/play/p/2maANglKHQE)]\n-   **\u003cbig\u003eTimestampNano\u003c/big\u003e** : returns current nano second timestamp.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#TimestampNano)]\n    [[play](https://go.dev/play/p/A9Oq_COrcCF)]\n-   **\u003cbig\u003eTrackFuncTime\u003c/big\u003e** : tracks function execution time.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#TrackFuncTime)]\n    [[play](https://go.dev/play/p/QBSEdfXHPTp)]\n-   **\u003cbig\u003eDaysBetween\u003c/big\u003e** : returns the number of days between two times.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#DaysBetween)]\n    [[play](https://go.dev/play/p/qD6qGb3TbOy)]\n-   **\u003cbig\u003eGenerateDatetimesBetween\u003c/big\u003e** : returns a slice of strings between two times.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#GenerateDatetimesBetween)]\n    [[play](https://go.dev/play/p/6kHBpAxD9ZC)]\n-   **\u003cbig\u003eMin\u003c/big\u003e** : returns the earliest time among the given times.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#Min)]\n    [[play](https://go.dev/play/p/MCIDvHNOGGb)]\n-   **\u003cbig\u003eMax\u003c/big\u003e** : returns the latest time among the given times.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#Max)]\n    [[play](https://go.dev/play/p/9m6JMk1LB7-)]\n-   **\u003cbig\u003eMaxMin\u003c/big\u003e** : returns the latest and earliest time among the given times.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#MaxMin)]\n    [[play](https://go.dev/play/p/rbW51cDtM_2)]\n\n\u003ch3 id=\"datastructure\"\u003e 8. Datastructure package contains some common data structure. eg. list, linklist, stack, queue, set, tree, graph. \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e\u003c/h3\u003e\n\n```go\nimport list \"github.com/duke-git/lancet/v2/datastructure/list\"\nimport copyonwritelist \"github.com/duke-git/lancet/v2/datastructure/copyonwritelist\"\nimport link \"github.com/duke-git/lancet/v2/datastructure/link\"\nimport stack \"github.com/duke-git/lancet/v2/datastructure/stack\"\nimport queue \"github.com/duke-git/lancet/v2/datastructure/queue\"\nimport set \"github.com/duke-git/lancet/v2/datastructure/set\"\nimport tree \"github.com/duke-git/lancet/v2/datastructure/tree\"\nimport heap \"github.com/duke-git/lancet/v2/datastructure/heap\"\nimport hashmap \"github.com/duke-git/lancet/v2/datastructure/hashmap\"\nimport optional \"github.com/duke-git/lancet/v2/datastructure/optional\"\n```\n\n#### Structure list:\n\n-   **\u003cbig\u003eList\u003c/big\u003e** : a linear table, implemented with slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datastructure/list.md)]\n-   **\u003cbig\u003eCopyOnWriteList\u003c/big\u003e** : a thread-safe list implementation that uses go slicing as its base.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datastructure/copyonwritelist.md)]\n-   **\u003cbig\u003eLink\u003c/big\u003e** : link list structure, contains singly link and doubly link.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datastructure/link.md)]\n-   **\u003cbig\u003eStack\u003c/big\u003e** : stack structure(fifo), contains array stack and link stack.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datastructure/stack.md)]\n-   **\u003cbig\u003eQueue\u003c/big\u003e** : queue structure(filo), contains array queue, circular queue, link queue and priority queue.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datastructure/queue.md)]\n-   **\u003cbig\u003eSet\u003c/big\u003e** : a data container, like slice, but element of set is not duplicate.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datastructure/set.md)]\n-   **\u003cbig\u003eTree\u003c/big\u003e** : binary search tree structure.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datastructure/tree.md)]\n-   **\u003cbig\u003eHeap\u003c/big\u003e** : a binary max heap.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datastructure/heap.md)]\n-   **\u003cbig\u003eHashmap\u003c/big\u003e** : hash map structure.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datastructure/hashmap.md)]\n-   **\u003cbig\u003eOptional\u003c/big\u003e** : Optional container.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datastructure/optional.md)]\n      \n\n\u003ch3 id=\"eventbus\"\u003e 9. EventBus is an event bus used for handling events within an application. \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eIndex\u003c/a\u003e\u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/eventbus\"\n```\n\n#### 函数列表:\n\n-   **\u003cbig\u003eNewEventBus\u003c/big\u003e** : Create an EventBus instance.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/eventbus.md#NewEventBus)]\n    [[play](https://go.dev/play/p/gHbOPV_NUOJ)]\n-   **\u003cbig\u003eSubscribe\u003c/big\u003e** : subscribes to an event with a specific event topic and listener function.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/eventbus.md#Subscribe)]\n    [[play](https://go.dev/play/p/EYGf_8cHei-)]\n-   **\u003cbig\u003eUnsubscribe\u003c/big\u003e** : unsubscribes from an event with a specific event topic and listener function.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/eventbus.md#Unsubscribe)]\n    [[play](https://go.dev/play/p/Tmh7Ttfvprf)]\n-   **\u003cbig\u003ePublish\u003c/big\u003e** : publishes an event with a specific event topic and data payload.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/eventbus.md#Publish)]\n    [[play](https://go.dev/play/p/gHTtVexFSH9)]\n-   **\u003cbig\u003eClearListeners\u003c/big\u003e** : clears all the listeners.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/eventbus.md#ClearListeners)]\n    [[play](https://go.dev/play/p/KBfBYlKPgqD)]\n-   **\u003cbig\u003eClearListenersByTopic\u003c/big\u003e** : clears all the listeners by topic.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/eventbus.md#ClearListenersByTopic)]\n    [[play](https://go.dev/play/p/gvMljmJOZmU)]\n-   **\u003cbig\u003eGetListenersCount\u003c/big\u003e** : returns the number of listeners for a specific event topic.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/eventbus.md#GetListenersCount)]\n    [[play](https://go.dev/play/p/8VPJsMQgStM)]\n-   **\u003cbig\u003eGetAllListenersCount\u003c/big\u003e** : returns the total number of all listeners.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/eventbus.md#GetAllListenersCount)]\n    [[play](https://go.dev/play/p/PUlr0xcpEOz)]\n-   **\u003cbig\u003eGetEvents\u003c/big\u003e** : returns all the events topics.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/eventbus.md#GetEvents)]\n    [[play](https://go.dev/play/p/etgjjcOtAjX)]\n-   **\u003cbig\u003eSetErrorHandler\u003c/big\u003e** : sets the error handler function.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/eventbus.md#SetErrorHandler)]\n    [[play](https://go.dev/play/p/gmB0gnFe5mc)]\n\n\u003ch3 id=\"fileutil\"\u003e 9. Fileutil package implements some basic functions for file operations. \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e\u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/fileutil\"\n```\n\n#### Function list：\n\n-   **\u003cbig\u003eClearFile\u003c/big\u003e** : write empty string to target file.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#ClearFile)]\n    [[play](https://go.dev/play/p/NRZ0ZT-G94H)]\n-   **\u003cbig\u003eCreateFile\u003c/big\u003e** : create file in path.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#CreateFile)]\n    [[play](https://go.dev/play/p/lDt8PEsTNKI)]\n-   **\u003cbig\u003eCreateDir\u003c/big\u003e** : create directory in absolute path.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#CreateDir)]\n    [[play](https://go.dev/play/p/qUuCe1OGQnM)]\n-   **\u003cbig\u003eCopyFile\u003c/big\u003e** : copy src file to dest file.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#CopyFile)]\n    [[play](https://go.dev/play/p/Jg9AMJMLrJi)]\n-   **\u003cbig\u003eCopyDir\u003c/big\u003e** : copy src directory to dest directory.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#CopyDir)]\n    [[play](https://go.dev/play/p/YAyFTA_UuPb)]\n-   **\u003cbig\u003eFileMode\u003c/big\u003e** : return file's mode and permission.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#FileMode)]\n    [[play](https://go.dev/play/p/2l2hI42fA3p)]\n-   **\u003cbig\u003eMiMeType\u003c/big\u003e** : return file mime type.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#MiMeType)]\n    [[play](https://go.dev/play/p/bd5sevSUZNu)]\n-   **\u003cbig\u003eIsExist\u003c/big\u003e** : checks if a file or directory exists.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#IsExist)]\n    [[play](https://go.dev/play/p/nKKXt8ZQbmh)]\n-   **\u003cbig\u003eIsLink\u003c/big\u003e** : checks if a file is symbol link or not.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#IsLink)]\n    [[play](https://go.dev/play/p/TL-b-Kzvf44)]\n-   **\u003cbig\u003eIsDir\u003c/big\u003e** : checks if the path is directory or not.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#IsDir)]\n    [[play](https://go.dev/play/p/WkVwEKqtOWk)]\n-   **\u003cbig\u003eListFileNames\u003c/big\u003e** : return all file names in the path.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#ListFileNames)]\n    [[play](https://go.dev/play/p/Tjd7Y07rejl)]\n-   **\u003cbig\u003eRemoveFile\u003c/big\u003e** : remove file, param should be file path.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#RemoveFile)]\n    [[play](https://go.dev/play/p/P2y0XW8a1SH)]\n-   **\u003cbig\u003eReadFileToString\u003c/big\u003e** : return string of file content.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#ReadFileToString)]\n    [[play](https://go.dev/play/p/cmfwp_5SQTp)]\n-   **\u003cbig\u003eReadFileByLine\u003c/big\u003e** : read file line by line, return string slice of file content.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#ReadFileByLine)]\n    [[play](https://go.dev/play/p/svJP_7ZrBrD)]\n-   **\u003cbig\u003eZip\u003c/big\u003e** : create a zip file of fpath, fpath could be a file or a directory.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#Zip)]\n    [[play](https://go.dev/play/p/j-3sWBp8ik_P)]\n-   **\u003cbig\u003eZipAppendEntry\u003c/big\u003e** : append a single file or directory by fpath to an existing zip file.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#ZipAppendEntry)]\n-   **\u003cbig\u003eUnZip\u003c/big\u003e** : unzip the zip file and save it to dest path.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#UnZip)]\n    [[play](https://go.dev/play/p/g0w34kS7B8m)]\n-   **\u003cbig\u003eCurrentPath\u003c/big\u003e** : return current absolute path.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#CurrentPath)]\n    [[play](https://go.dev/play/p/s74a9iBGcSw)]\n-   **\u003cbig\u003eIsZipFile\u003c/big\u003e** : checks if file is zip file or not.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#IsZipFile)]\n    [[play](https://go.dev/play/p/9M0g2j_uF_e)]\n-   **\u003cbig\u003eFileSize\u003c/big\u003e** : return file size in bytes.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#FileSize)]\n    [[play](https://go.dev/play/p/H9Z05uD-Jjc)]\n-   **\u003cbig\u003eMTime\u003c/big\u003e** : return file modified time(unix timestamp).\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#MTime)]\n    [[play](https://go.dev/play/p/s_Tl7lZoAaY)]\n-   **\u003cbig\u003eSha\u003c/big\u003e** : return file sha value.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#Sha)]\n    [[play](https://go.dev/play/p/VfEEcO2MJYf)]\n-   **\u003cbig\u003eReadCsvFile\u003c/big\u003e** : read file content into slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#ReadCsvFile)]\n    [[play](https://go.dev/play/p/OExTkhGEd3_u)]\n-   **\u003cbig\u003eWriteCsvFile\u003c/big\u003e** : write content to target csv file.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#WriteCsvFile)]\n-   **\u003cbig\u003eWriteMapsToCsv\u003c/big\u003e** : write slice of map to csv file.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#WriteMapsToCsv)]\n    [[play](https://go.dev/play/p/umAIomZFV1c)]\n-   **\u003cbig\u003eWriteBytesToFile\u003c/big\u003e** : write bytes to target file.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#WriteBytesToFile)]\n    [[play](https://go.dev/play/p/s7QlDxMj3P8)]\n-   **\u003cbig\u003eWriteStringToFile\u003c/big\u003e** : write string to target file.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#WriteStringToFile)]\n    [[play](https://go.dev/play/p/GhLS6d8lH_g)]\n-   **\u003cbig\u003eReadFile\u003c/big\u003e** : read file or url.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#ReadFile)]\n-   **\u003cbig\u003eChunkRead\u003c/big\u003e** : reads a block from the file at the specified offset and returns all lines within the block.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#ChunkRead)]\n    [[play](https://go.dev/play/p/r0hPmKWhsgf)]\n-   **\u003cbig\u003eParallelChunkRead\u003c/big\u003e** : reads the file in parallel and send each chunk of lines to the specified channel.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#ParallelChunkRead)]  \n    [[play](https://go.dev/play/p/teMXnCsdSEw)]\n-   **\u003cbig\u003eGetExeOrDllVersion\u003c/big\u003e** : Get the version of exe or dll file on windows os.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/fileutil.md#GetExeOrDllVersion)]\n    [[play](https://go.dev/play/p/iLRrDBhE38E)]\n\n\u003ch3 id=\"formatter\"\u003e 10. Formatter contains some functions for data formatting. \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e\u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/formatter\"\n```\n\n#### Function list:\n\n-   **\u003cbig\u003eComma\u003c/big\u003e** : add comma to a number value by every 3 numbers from right, ahead by a prefix symbol char.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/formatter.md#Comma)]\n    [[play](https://go.dev/play/p/eRD5k2vzUVX)]\n-   **\u003cbig\u003ePretty\u003c/big\u003e** : pretty print data to JSON string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/formatter.md#Pretty)]\n    [[play](https://go.dev/play/p/YsciGj3FH2x)]\n-   **\u003cbig\u003ePrettyToWriter\u003c/big\u003e** : pretty encode data to writer.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/formatter.md#PrettyToWriter)]\n    [[play](https://go.dev/play/p/LPLZ3lDi5ma)]\n-   **\u003cbig\u003eDecimalBytes\u003c/big\u003e** : returns a human readable byte size under decimal standard (base 1000).\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/formatter.md#DecimalBytes)]\n    [[play](https://go.dev/play/p/FPXs1suwRcs)]\n-   **\u003cbig\u003eBinaryBytes\u003c/big\u003e** : returns a human-readable byte size under binary standard (base 1024).\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/formatter.md#BinaryBytes)]\n    [[play](https://go.dev/play/p/G9oHHMCAZxP)]\n-   **\u003cbig\u003eParseDecimalBytes\u003c/big\u003e** : return the human readable bytes size string into the amount it represents(base 1000).\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/formatter.md#ParseDecimalBytes)]\n    [[play](https://go.dev/play/p/Am98ybWjvjj)]\n-   **\u003cbig\u003eParseBinaryBytes\u003c/big\u003e** : return the human readable bytes size string into the amount it represents(base 1024).\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/formatter.md#ParseBinaryBytes)]\n    [[play](https://go.dev/play/p/69v1tTT62x8)]\n\n\u003ch3 id=\"function\"\u003e 11. Function package can control the flow of function execution and support part of functional programming.\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e\u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/function\"\n```\n\n#### Function list:\n\n-   **\u003cbig\u003eAfter\u003c/big\u003e** : return a function that invokes passed function once the returned function is called more than n times.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#After)]\n    [[play](https://go.dev/play/p/eRD5k2vzUVX)]\n-   **\u003cbig\u003eBefore\u003c/big\u003e** : return a function that invokes passed function once the returned function is called less than n times\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Before)]\n    [[play](https://go.dev/play/p/0HqUDIFZ3IL)]\n-   **\u003cbig\u003eCurryFn\u003c/big\u003e** : make a curry function.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#CurryFn)]\n    [[play](https://go.dev/play/p/5HopfDwANKX)]\n-   **\u003cbig\u003eCompose\u003c/big\u003e** : compose the functions from right to left.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Compose)]\n    [[play](https://go.dev/play/p/KKfugD4PKYF)]\n-   **\u003cbig\u003eDelay\u003c/big\u003e** : call the function after delayed time.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Delay)]\n    [[play](https://go.dev/play/p/Ivtc2ZE-Tye)]\n-   **\u003cbig\u003eDebounced\u003csup\u003edeprecated\u003c/sup\u003e\u003c/big\u003e** : creates a debounced function that delays invoking fn until after wait duration have elapsed since the last time the debounced function was invoked.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Debounced)]\n    [[play](https://go.dev/play/p/absuEGB_GN7)]\n-   **\u003cbig\u003eDebounce\u003c/big\u003e** : creates a debounced version of the provided function.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Debounce)]\n    [[play](https://go.dev/play/p/-dGFrYn_1Zi)]\n-   **\u003cbig\u003eThrottle\u003c/big\u003e** : creates a throttled version of the provided function.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Throttle)]\n    [[play](https://go.dev/play/p/HpoMov-tJSN)]\n-   **\u003cbig\u003eSchedule\u003c/big\u003e** : invoke function every duration time, util close the returned bool channel.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Schedule)]\n    [[play](https://go.dev/play/p/hbON-Xeyn5N)]\n-   **\u003cbig\u003ePipeline\u003c/big\u003e** : takes a list of functions and returns a function whose param will be passed into the functions one by one.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Pipeline)]\n    [[play](https://go.dev/play/p/mPdUVvj6HD6)]\n-   **\u003cbig\u003eAcceptIf\u003c/big\u003e** : returns another function of the same signature as the apply function but also includes a bool value to indicate success or failure.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#AcceptIf)]\n    [[play](https://go.dev/play/p/XlXHHtzCf7d)]\n-   **\u003cbig\u003eAnd\u003c/big\u003e** : returns a composed predicate that represents the logical AND of a list of predicates.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#And)]\n    [[play](https://go.dev/play/p/dTBHJMQ0zD2)]\n-   **\u003cbig\u003eOr\u003c/big\u003e** : returns a composed predicate that represents the logical OR of a list of predicates.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Or)]\n    [[play](https://go.dev/play/p/LitCIsDFNDA)]\n-   **\u003cbig\u003eNegate\u003c/big\u003e** : returns a predicate that represents the logical negation of this predicate.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Negate)]\n    [[play](https://go.dev/play/p/jbI8BtgFnVE)]\n-   **\u003cbig\u003eNor\u003c/big\u003e** : returns a composed predicate that represents the logical NOR of a list of predicates.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Nor)]\n    [[play](https://go.dev/play/p/2KdCoBEOq84)]\n-   **\u003cbig\u003eNand\u003c/big\u003e** : returns a composed predicate that represents the logical Nand of a list of predicates.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Nand)]\n    [[play](https://go.dev/play/p/Rb-FdNGpgSO)]\n-   **\u003cbig\u003eXnor\u003c/big\u003e** : returns a composed predicate that represents the logical XNOR of a list of predicates.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Xnor)]\n    [[play](https://go.dev/play/p/FJxko8SFbqc)]\n-   **\u003cbig\u003eWatcher\u003c/big\u003e** : Watcher is used for record code execution time. can start/stop/reset the watch timer. get the elapsed time of function execution.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Watcher)]\n    [[play](https://go.dev/play/p/l2yrOpCLd1I)]\n\n\n\u003ch3 id=\"maputil\"\u003e 12. Maputil package includes some functions to manipulate map.\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e\u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/maputil\"\n```\n\n#### Function list:\n\n-   **\u003cbig\u003eMapTo\u003c/big\u003e** : quick map any value to struct or any base type.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#MapTo)]\n    [[play](https://go.dev/play/p/4K7KBEPgS5M)]\n-   **\u003cbig\u003eForEach\u003c/big\u003e** : executes iteratee function for every key and value pair in map.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#ForEach)]\n    [[play](https://go.dev/play/p/OaThj6iNVXK)]\n-   **\u003cbig\u003eFilter\u003c/big\u003e** : iterates over map, return a new map contains all key and value pairs pass the predicate function.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#Filter)]\n    [[play](https://go.dev/play/p/fSvF3wxuNG7)]\n-   **\u003cbig\u003eFilterByKeys\u003c/big\u003e** : iterates over map, return a new map whose keys are all given keys\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#FilterByKeys)]\n    [[play](https://go.dev/play/p/7ov6BJHbVqh)]\n-   **\u003cbig\u003eFilterByValues\u003c/big\u003e** : iterates over map, return a new map whose values are all given values.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#FilterByValues)]\n    [[play](https://go.dev/play/p/P3-9MdcXegR)]\n-   **\u003cbig\u003eOmitBy\u003c/big\u003e** : the opposite of Filter, removes all the map elements for which the predicate function returns true.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OmitBy)]\n    [[play](https://go.dev/play/p/YJM4Hj5hNwm)]\n-   **\u003cbig\u003eOmitByKeys\u003c/big\u003e** : the opposite of FilterByKeys, extracts all the map elements which keys are not omitted.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OmitByKeys)]\n    [[play](https://go.dev/play/p/jXGrWDBfSRp)]\n-   **\u003cbig\u003eOmitByValues\u003c/big\u003e** : the opposite of FilterByValues. remove all elements whose value are in the give slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OmitByValues)]\n    [[play](https://go.dev/play/p/XB7Y10uw20_U)]\n-   **\u003cbig\u003eIntersect\u003c/big\u003e** : iterates over maps, return a new map of key and value pairs in all given maps.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#Intersect)]\n    [[play](https://go.dev/play/p/Zld0oj3sjcC)]\n-   **\u003cbig\u003eKeys\u003c/big\u003e** : returns a slice of the map's keys.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#Keys)]\n    [[play](https://go.dev/play/p/xNB5bTb97Wd)]\n-   **\u003cbig\u003eKeysBy\u003c/big\u003e** : creates a slice whose element is the result of function mapper invoked by every map's key.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#KeysBy)]\n    [[play](https://go.dev/play/p/hI371iB8Up8)]\n-   **\u003cbig\u003eMerge\u003c/big\u003e** : merge maps, next key will overwrite previous key.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#Merge)]\n    [[play](https://go.dev/play/p/H95LENF1uB-)]\n-   **\u003cbig\u003eMinus\u003c/big\u003e** : creates a map of whose key in mapA but not in mapB.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#Minus)]\n    [[play](https://go.dev/play/p/3u5U9K7YZ9m)]\n-   **\u003cbig\u003eValues\u003c/big\u003e** : returns a slice of the map's values.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#Values)]\n    [[play](https://go.dev/play/p/CBKdUc5FTW6)]\n-   **\u003cbig\u003eValuesBy\u003c/big\u003e** : creates a slice whose element is the result of function mapper invoked by every map's value.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#ValuesBy)]\n    [[play](https://go.dev/play/p/sg9-oRidh8f)]\n-   **\u003cbig\u003eMapKeys\u003c/big\u003e** : transforms a map to other type map by manipulating it's keys.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#MapKeys)]\n    [[play](https://go.dev/play/p/8scDxWeBDKd)]\n-   **\u003cbig\u003eMapValues\u003c/big\u003e** : transforms a map to other type map by manipulating it's values.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#MapValues)]\n    [[play](https://go.dev/play/p/g92aY3fc7Iw)]\n-   **\u003cbig\u003eEntries\u003c/big\u003e** : transforms a map into array of key/value pairs.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#Entries)]\n    [[play](https://go.dev/play/p/Ltb11LNcElY)]\n-   **\u003cbig\u003eFromEntries\u003c/big\u003e** : creates a map based on a slice of key/value pairs.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#FromEntries)]\n    [[play](https://go.dev/play/p/fTdu4sCNjQO)]\n-   **\u003cbig\u003eTransform\u003c/big\u003e** : transform a map to another type map.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#Transform)]\n    [[play](https://go.dev/play/p/P6ovfToM3zj)]\n-   **\u003cbig\u003eIsDisjoint\u003c/big\u003e** : check two map are disjoint if they have no keys in common.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#IsDisjoint)]\n    [[play](https://go.dev/play/p/N9qgYg_Ho6f)]\n-   **\u003cbig\u003eHasKey\u003c/big\u003e** : checks if map has key or not.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#HasKey)]\n    [[play](https://go.dev/play/p/isZZHOsDhFc)]\n-   **\u003cbig\u003eGetOrSet\u003c/big\u003e** : returns value of the given key or set the given value value if not present.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#GetOrSet)]\n    [[play](https://go.dev/play/p/IVQwO1OkEJC)]\n-   **\u003cbig\u003eMapToStruct\u003c/big\u003e** : converts map to struct.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#MapToStruct)]\n    [[play](https://go.dev/play/p/7wYyVfX38Dp)]\n-   **\u003cbig\u003eToSortedSlicesDefault\u003c/big\u003e** : converts a map to two slices sorted by key: one for the keys and another for the values.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#ToSortedSlicesDefault)]\n    [[play](https://go.dev/play/p/43gEM2po-qy)]\n-   **\u003cbig\u003eToSortedSlicesWithComparator\u003c/big\u003e** : converts a map to two slices sorted by key and using a custom comparison function: one for the keys and another for the values.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#ToSortedSlicesWithComparator)]\n    [[play](https://go.dev/play/p/0nlPo6YLdt3)]\n-   **\u003cbig\u003eNewOrderedMap\u003c/big\u003e** : creates a new OrderedMap.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#NewOrderedMap)]\n    [[play](https://go.dev/play/p/Y4ZJ_oOc1FU)]\n-   **\u003cbig\u003eOrderedMap_Set\u003c/big\u003e** : sets the given key-value pair for ordered map.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_Set)]\n    [[play](https://go.dev/play/p/Y4ZJ_oOc1FU)]\n-   **\u003cbig\u003eOrderedMap_Get\u003c/big\u003e** : returns the value for the given key.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_Get)]\n    [[play](https://go.dev/play/p/Y4ZJ_oOc1FU)]\n-   **\u003cbig\u003eOrderedMap_Delete\u003c/big\u003e** : deletes the key-value pair for the given key.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_Delete)]\n    [[play](ttps://go.dev/play/p/5bIi4yaZ3K-)]\n-   **\u003cbig\u003eOrderedMap_Clear\u003c/big\u003e** : clears the ordered map.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_Clear)]\n    [[play](https://go.dev/play/p/8LwoJyEfuFr)]\n-   **\u003cbig\u003eOrderedMap_Front\u003c/big\u003e** : returns the first key-value pair.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_Front)]\n    [[play](https://go.dev/play/p/ty57XSimpoe)]\n-   **\u003cbig\u003eOrderedMap_Back\u003c/big\u003e** : returns the last key-value pair.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_Back)]\n    [[play](https://go.dev/play/p/rQMjp1yQmpa)]\n-   **\u003cbig\u003eOrderedMap_Range\u003c/big\u003e** : calls the given function for each key-value pair.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_Range)]\n    [[play](https://go.dev/play/p/U-KpORhc7LZ)]\n-   **\u003cbig\u003eOrderedMap_Keys\u003c/big\u003e** : returns the keys in order.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_Keys)]\n    [[play](https://go.dev/play/p/Vv_y9ExKclA)]\n-   **\u003cbig\u003eOrderedMap_Values\u003c/big\u003e** : returns the values in order.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_Values)]\n    [[play](https://go.dev/play/p/TWj5n1-PUfx)]\n-   **\u003cbig\u003eOrderedMap_Elements\u003c/big\u003e** : returns the key-value pairs in order.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_Elements)]\n    [[play](https://go.dev/play/p/4BHG4kKz6bB)]\n-   **\u003cbig\u003eOrderedMap_Len\u003c/big\u003e** : returns the number of key-value pairs.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_Len)]\n    [[play](https://go.dev/play/p/cLe6z2VX5N-)]\n-   **\u003cbig\u003eOrderedMap_Contains\u003c/big\u003e** : returns true if the given key exists.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_Contains)]\n    [[play](https://go.dev/play/p/QuwqqnzwDNX)]\n-   **\u003cbig\u003eOrderedMap_Iter\u003c/big\u003e** : returns a channel that yields key-value pairs in order.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_Iter)]\n    [[play](https://go.dev/play/p/tlq2tdvicPt)]\n-   **\u003cbig\u003eOrderedMap_ReverseIter\u003c/big\u003e** : returns a channel that yields key-value pairs in reverse order.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_ReverseIter)]\n    [[play](https://go.dev/play/p/8Q0ssg6hZzO)]\n-   **\u003cbig\u003eOrderedMap_SortByKey\u003c/big\u003e** : sorts the map by key given less function.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_SortByKey)]\n    [[play](https://go.dev/play/p/N7hjD_alZPq)]\n-   **\u003cbig\u003eOrderedMap_MarshalJSON\u003c/big\u003e** : implements the json.Marshaler interface.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_MarshalJSON)]\n    [[play](https://go.dev/play/p/C-wAwydIAC7)]\n-   **\u003cbig\u003eOrderedMap_UnmarshalJSON\u003c/big\u003e** : implements the json.Unmarshaler interface.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OrderedMap_UnmarshalJSON)]\n    [[play](https://go.dev/play/p/t_pkwerIRVx)]\n-   **\u003cbig\u003eNewConcurrentMap\u003c/big\u003e** : creates a ConcurrentMap with specific shard count.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#NewConcurrentMap)]\n    [[play](https://go.dev/play/p/3PenTPETJT0)]\n-   **\u003cbig\u003eConcurrentMap_Set\u003c/big\u003e** : set the value for a key.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#ConcurrentMap_Set)]\n    [[play](https://go.dev/play/p/3PenTPETJT0)]\n-   **\u003cbig\u003eConcurrentMap_Get\u003c/big\u003e** : get the value stored in the map for a key, or nil if no.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#ConcurrentMap_Get)]\n    [[play](https://go.dev/play/p/3PenTPETJT0)]\n-   **\u003cbig\u003eConcurrentMap_GetOrSet\u003c/big\u003e** : returns the existing value for the key if present.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#ConcurrentMap_GetOrSet)]\n    [[play](https://go.dev/play/p/aDcDApOK01a)]\n-   **\u003cbig\u003eConcurrentMap_Delete\u003c/big\u003e** : delete the value for a key.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#ConcurrentMap_Delete)]\n    [[play](https://go.dev/play/p/uTIJZYhpVMS)]\n-   **\u003cbig\u003eConcurrentMap_GetAndDelete\u003c/big\u003e** :returns the existing value for the key if present and then delete the value for the key.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#ConcurrentMap_GetAndDelete)]\n    [[play](https://go.dev/play/p/ZyxeIXSZUiM)]\n-   **\u003cbig\u003eConcurrentMap_Has\u003c/big\u003e** : checks if map has the value for a key.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#ConcurrentMap_Has)]\n    [[play](https://go.dev/play/p/C8L4ul9TVwf)]\n-   **\u003cbig\u003eConcurrentMap_Range\u003c/big\u003e** : calls iterator sequentially for each key and value present in each of the shards in the map.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#ConcurrentMap_Range)]\n    [[play](https://go.dev/play/p/iqcy7P8P0Pr)]\n-   **\u003cbig\u003eSortByKey\u003c/big\u003e** : sorts the map by its keys and returns a new map with sorted keys.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#SortByKey)]\n    [[play](https://go.dev/play/p/PVdmBSnm6P_W)]\n-   **\u003cbig\u003eGetOrDefault\u003c/big\u003e** : returns the value of the given key or a default value if the key is not present.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#GetOrDefault)]\n    [[play](https://go.dev/play/p/99QjSYSBdiM)]\n\n\n\u003ch3 id=\"mathutil\"\u003e 13. Mathutil package implements some functions for math calculation. \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e\u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/mathutil\"\n```\n\n#### Function list:\n\n-   **\u003cbig\u003eAverage\u003c/big\u003e** :return average value of numbers.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Average)]\n    [[play](https://go.dev/play/p/Vv7LBwER-pz)]\n-   **\u003cbig\u003eExponent\u003c/big\u003e** : calculate x^n for int64.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Exponent)]\n    [[play](https://go.dev/play/p/uF3HGNPk8wr)]\n-   **\u003cbig\u003eFibonacci\u003c/big\u003e** :calculate fibonacci number before n for int.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Fibonacci)]\n    [[play](https://go.dev/play/p/IscseUNMuUc)]\n-   **\u003cbig\u003eFactorial\u003c/big\u003e** : calculate x! for uint.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Factorial)]\n    [[play](https://go.dev/play/p/tt6LdOK67Nx)]\n-   **\u003cbig\u003eMax\u003c/big\u003e** : return maximum value of numbers.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Max)]\n    [[play](https://go.dev/play/p/cN8DHI0rTkH)]\n-   **\u003cbig\u003eMaxBy\u003c/big\u003e** : return the maximum value of a slice using the given comparator function.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#MaxBy)]\n    [[play](https://go.dev/play/p/pbe2MT-7DV2)]\n-   **\u003cbig\u003eMin\u003c/big\u003e** : return minimum value of numbers.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Min)]\n    [[play](https://go.dev/play/p/21BER_mlGUj)]\n-   **\u003cbig\u003eMinBy\u003c/big\u003e** : return the minimum value of a slice using the given comparator function.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#MinBy)]\n    [[play](https://go.dev/play/p/N9qgYg_Ho6f)]\n-   **\u003cbig\u003ePercent\u003c/big\u003e** : calculate the percentage of value to total.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Percent)]\n    [[play](https://go.dev/play/p/s0NdFCtwuyd)]\n-   **\u003cbig\u003eRoundToFloat\u003c/big\u003e** : round up to n decimal places for float64.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#RoundToFloat)]\n    [[play](https://go.dev/play/p/ghyb528JRJL)]\n-   **\u003cbig\u003eRoundToString\u003c/big\u003e** : round up to n decimal places for float64, return string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#RoundToString)]\n    [[play](https://go.dev/play/p/kZwpBRAcllO)]\n-   **\u003cbig\u003eTruncRound\u003c/big\u003e** : round off n decimal places for int64.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#TruncRound)]\n    [[play](https://go.dev/play/p/aumarSHIGzP)]\n-   **\u003cbig\u003eCeilToFloat\u003c/big\u003e** : round float up n decimal places.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#CeilToFloat)]\n    [[play](https://go.dev/play/p/8hOeSADZPCo)]\n-   **\u003cbig\u003eCeilToString\u003c/big\u003e** : round float up n decimal places, then conver to string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#CeilToString)]\n    [[play](https://go.dev/play/p/wy5bYEyUKKG)]\n-   **\u003cbig\u003eFloorToFloat\u003c/big\u003e** : round float down n decimal places.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#FloorToFloat)]\n    [[play](https://go.dev/play/p/vbCBrQHZEED)]\n-   **\u003cbig\u003eFloorToString\u003c/big\u003e** : round float down n decimal places, then conver to string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#FloorToString)]\n    [[play](https://go.dev/play/p/Qk9KPd2IdDb)]\n-   **\u003cbig\u003eRange\u003c/big\u003e** : Creates a slice of numbers from start with specified count, element step is 1.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Range)]\n    [[play](https://go.dev/play/p/9ke2opxa8ZP)]\n-   **\u003cbig\u003eRangeWithStep\u003c/big\u003e** : Creates a slice of numbers from start to end with specified step.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Range)]\n    [[play](https://go.dev/play/p/akLWz0EqOSM)]\n-   **\u003cbig\u003eAngleToRadian\u003c/big\u003e** : converts angle value to radian value.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#AngleToRadian)]\n    [[play](https://go.dev/play/p/CIvlICqrHql)]\n-   **\u003cbig\u003eRadianToAngle\u003c/big\u003e** : converts radian value to angle value.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#RadianToAngle)]\n    [[play](https://go.dev/play/p/dQtmOTUOMgi)]\n-   **\u003cbig\u003ePointDistance\u003c/big\u003e** : get two points distance.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#PointDistance)]\n    [[play](https://go.dev/play/p/RrG4JIaziM8)]\n-   **\u003cbig\u003eIsPrime\u003c/big\u003e** : checks if number is prime number.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#IsPrime)]\n    [[play](https://go.dev/play/p/Rdd8UTHZJ7u)]\n-   **\u003cbig\u003eGCD\u003c/big\u003e** : return greatest common divisor (GCD) of integers.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#GCD)]\n    [[play](https://go.dev/play/p/CiEceLSoAKB)]\n-   **\u003cbig\u003eLCM\u003c/big\u003e** : return Least Common Multiple (LCM) of integers.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#LCM)]\n    [[play](https://go.dev/play/p/EjcZxfY7G_g)]\n-   **\u003cbig\u003eCos\u003c/big\u003e** : return the cosine of the radian argument.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Cos)]\n    [[play](https://go.dev/play/p/Sm89LoIfvFq)]\n-   **\u003cbig\u003eSin\u003c/big\u003e** : return the sine of the radian argument.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Sin)]\n    [[play](https://go.dev/play/p/TWMQlMywDsP)]\n-   **\u003cbig\u003eLog\u003c/big\u003e** : returns the logarithm of base n.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Log)]\n    [[play](https://go.dev/play/p/_d4bi8oyhat)]\n-   **\u003cbig\u003eSum\u003c/big\u003e** : return sum of passed numbers.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Sum)]\n    [[play](https://go.dev/play/p/1To2ImAMJA7)]\n-   **\u003cbig\u003eAbs\u003c/big\u003e** : returns the absolute value of param number.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Sum)]\n    [[play](https://go.dev/play/p/fsyBh1Os-1d)]\n-   **\u003cbig\u003eDiv\u003c/big\u003e** : returns the result of x divided by y.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Div)]\n    [[play](https://go.dev/play/p/WLxDdGXXYat)]\n-   **\u003cbig\u003eVariance\u003c/big\u003e** : returns the variance of numbers.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Variance)]\n    [[play](https://go.dev/play/p/uHuV4YgXf8F)]\n-   **\u003cbig\u003eStdDev\u003c/big\u003e** : returns the standard deviation of numbers.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#StdDev)]\n    [[play](https://go.dev/play/p/FkNZDXvHD2l)]\n-   **\u003cbig\u003ePermutation\u003c/big\u003e** : calculates P(n, k).\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Permutation)]\n    [[play](https://go.dev/play/p/MgobwH_FOxj)]\n-   **\u003cbig\u003eCombination\u003c/big\u003e** : calculates C(n, k).\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Combination)]\n    [[play](https://go.dev/play/p/ENFQRDQUFi9)]\n\n\u003ch3 id=\"netutil\"\u003e 14. Netutil package contains functions to get net information and send http request. \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e\u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/netutil\"\n```\n\n#### Function list:\n\n-   **\u003cbig\u003eConvertMapToQueryString\u003c/big\u003e** : convert map to sorted url query string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#ConvertMapToQueryString)]\n    [[play](https://go.dev/play/p/jnNt_qoSnRi)]\n-   **\u003cbig\u003eEncodeUrl\u003c/big\u003e** : encode url(?a=1\u0026b=[2] -\u003e ?a=1\u0026b=%5B2%5D).\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#EncodeUrl)]\n    [[play](https://go.dev/play/p/bsZ6BRC4uKI)]\n-   **\u003cbig\u003eGetInternalIp\u003c/big\u003e** : return internal ipv4.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#GetInternalIp)]\n    [[play](https://go.dev/play/p/5mbu-gFp7ei)]\n-   **\u003cbig\u003eGetIps\u003c/big\u003e** : return all ipv4 of current system.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#GetIps)]\n    [[play](https://go.dev/play/p/NUFfcEmukx1)]\n-   **\u003cbig\u003eGetMacAddrs\u003c/big\u003e** : return mac address of current system.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#GetMacAddrs)]\n    [[play](https://go.dev/play/p/Rq9UUBS_Xp1)]\n-   **\u003cbig\u003eGetPublicIpInfo\u003c/big\u003e** : return [public ip information](http://ip-api.com/json/).\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#GetPublicIpInfo)]\n    [[play](https://go.dev/play/p/YDxIfozsRHR)]\n-   **\u003cbig\u003eGetRequestPublicIp\u003c/big\u003e** : return the http request public ip.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#GetRequestPublicIp)]\n    [[play](https://go.dev/play/p/kxU-YDc_eBo)]\n-   **\u003cbig\u003eIsPublicIP\u003c/big\u003e** : verify a ip is public or not.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#IsPublicIP)]\n    [[play](https://go.dev/play/p/nmktSQpJZnn)]\n-   **\u003cbig\u003eIsInternalIP\u003c/big\u003e** : verify an ip is intranet or not.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#IsInternalIP)]\n    [[play](https://go.dev/play/p/sYGhXbgO4Cb)]\n-   **\u003cbig\u003eHttpRequest\u003c/big\u003e** : a composed http request used for HttpClient send request.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#HttpRequest)]\n    [[play](https://go.dev/play/p/jUSgynekH7G)]\n-   **\u003cbig\u003eHttpClient\u003c/big\u003e** : a http client tool, used for sending http request\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#HttpClient)]\n    [[play](https://go.dev/play/p/jUSgynekH7G)]\n-   **\u003cbig\u003eSendRequest\u003c/big\u003e** : send http request.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#SendRequest)]\n    [[play](https://go.dev/play/p/jUSgynekH7G)]\n-   **\u003cbig\u003eDecodeResponse\u003c/big\u003e** : decode http response into target object.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#DecodeResponse)]\n    [[play](https://go.dev/play/p/jUSgynekH7G)]\n-   **\u003cbig\u003eStructToUrlValues\u003c/big\u003e** : convert struct to url values.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#StructToUrlValues)]\n    [[play](https://go.dev/play/p/pFqMkM40w9z)]\n-   **\u003cbig\u003eHttpGet\u003csup\u003edeprecated\u003c/sup\u003e\u003c/big\u003e** : send http get request.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#HttpGet)]\n-   **\u003cbig\u003eHttpDelete\u003csup\u003edeprecated\u003c/sup\u003e\u003c/big\u003e** : send http delete request.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#HttpDelete)]\n-   **\u003cbig\u003eHttpPost\u003csup\u003edeprecated\u003c/sup\u003e\u003c/big\u003e** : send http post request.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#HttpPost)]\n-   **\u003cbig\u003eHttpPut\u003csup\u003edeprecated\u003c/sup\u003e\u003c/big\u003e** : send http put request.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#HttpPut)]\n-   **\u003cbig\u003eHttpPatch\u003csup\u003edeprecated\u003c/sup\u003e\u003c/big\u003e** : send http patch request.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#HttpPatch)]\n-   **\u003cbig\u003eParseHttpResponse\u003c/big\u003e** : decode http response into target object.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#ParseHttpResponse)]\n-   **\u003cbig\u003eDownloadFile\u003c/big\u003e** : download the file exist in url to a local file.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#DownloadFile)]\n-   **\u003cbig\u003eUploadFile\u003c/big\u003e** : upload the file to a server.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#UploadFile)]\n-   **\u003cbig\u003eIsPingConnected\u003c/big\u003e** : checks if can ping the specified host or not.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#IsPingConnected)]\n    [[play](https://go.dev/play/p/q8OzTijsA87)]\n-   **\u003cbig\u003eIsTelnetConnected\u003c/big\u003e** : checks if can if can telnet the specified host or not.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#IsTelnetConnected)]\n    [[play](https://go.dev/play/p/yiLCGtQv_ZG)]\n\n\u003ch3 id=\"pointer\"\u003e 15. Pointer package contains some util functions to operate go pointer. \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e\u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/pointer\"\n```\n\n#### Function list:\n\n-   **\u003cbig\u003eExtractPointer\u003c/big\u003e** : return the underlying value by the given interface type.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/pointer.md#ExtractPointer)]\n    [[play](https://go.dev/play/p/D7HFjeWU2ZP)]\n-   **\u003cbig\u003eOf\u003c/big\u003e** : return a pointer to the value `v`.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/pointer.md#Of)]\n    [[play](https://go.dev/play/p/HFd70x4DrMj)]\n-   **\u003cbig\u003eUnwrap\u003c/big\u003e** : return the value from the pointer.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/pointer.md#Unwrap)]\n    [[play](https://go.dev/play/p/cgeu3g7cjWb)]\n-   **\u003cbig\u003eUnwrapOr\u003c/big\u003e** : UnwrapOr returns the value from the pointer or fallback if the pointer is nil.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/pointer.md#UnwrapOr)]\n    [[play](https://go.dev/play/p/mmNaLC38W8C)]\n-   **\u003cbig\u003eUnwarpOrDefault\u003c/big\u003e** : UnwarpOrDefault returns the value from the pointer or the default value if the pointer is nil.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/pointer.md#UnwrapOrDefault)]\n    [[play](https://go.dev/play/p/ZnGIHf8_o4E)]\n\n\u003ch3 id=\"random\"\u003e 16. Random package implements some basic functions to generate random int and string. \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e\u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/random\"\n```\n\n#### Function list:\n\n-   **\u003cbig\u003eRandBytes\u003c/big\u003e** : generate random byte slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandBytes)]\n    [[play](https://go.dev/play/p/EkiLESeXf8d)]\n-   **\u003cbig\u003eRandInt\u003c/big\u003e** : generate random int number between min and max.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandInt)]\n    [[play](https://go.dev/play/p/pXyyAAI5YxD)]\n-   **\u003cbig\u003eRandString\u003c/big\u003e** : generate random string of specific length.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandString)]\n    [[play](https://go.dev/play/p/W2xvRUXA7Mi)]\n-   **\u003cbig\u003eRandUpper\u003c/big\u003e** : generate a random upper case string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandUpper)]\n    [[play](https://go.dev/play/p/29QfOh0DVuh)]\n-   **\u003cbig\u003eRandLower\u003c/big\u003e** : generate a random lower case string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandLower)]\n    [[play](https://go.dev/play/p/XJtZ471cmtI)]\n-   **\u003cbig\u003eRandNumeral\u003c/big\u003e** : generate a random numeral string of specific length.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandNumeral)]\n    [[play](https://go.dev/play/p/g4JWVpHsJcf)]\n-   **\u003cbig\u003eRandNumeralOrLetter\u003c/big\u003e** : generate a random numeral or letter string.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandNumeralOrLetter)]\n    [[play](https://go.dev/play/p/19CEQvpx2jD)]\n-   **\u003cbig\u003eUUIdV4\u003c/big\u003e** : generate a random UUID of version 4 according to RFC 4122.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#UUIdV4)]\n    [[play](https://go.dev/play/p/_Z9SFmr28ft)]\n-   **\u003cbig\u003eRandUniqueIntSlice\u003c/big\u003e** : generate a slice of random int that do not repeat.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandUniqueIntSlice)]\n    [[play](https://go.dev/play/p/uBkRSOz73Ec)]\n-   **\u003cbig\u003eRandSymbolChar\u003c/big\u003e** : generate a random symbol char of specified length.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandSymbolChar)]\n    [[play](https://go.dev/play/p/Im6ZJxAykOm)]\n-   **\u003cbig\u003eRandFloat\u003c/big\u003e** : generate a random float64 number between [min, max) with specific precision.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandFloat)]\n    [[play](https://go.dev/play/p/zbD_tuobJtr)]\n-   **\u003cbig\u003eRandFloats\u003c/big\u003e** : generate a slice of random float64 numbers that do not repeat.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandFloats)]\n    [[play](https://go.dev/play/p/I3yndUQ-rhh)]\n-   **\u003cbig\u003eRandStringSlice\u003c/big\u003e** : generate a slice of random string of length strLen based on charset.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandStringSlice)]\n    [[play](https://go.dev/play/p/2_-PiDv3tGn)]\n-   **\u003cbig\u003eRandBool\u003c/big\u003e** : generate a random boolean value (true or false).\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandBool)]\n    [[play](https://go.dev/play/p/to6BLc26wBv)]\n-   **\u003cbig\u003eRandBoolSlice\u003c/big\u003e** : generate a random boolean slice of specified length.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandBoolSlice)]\n    [[play](https://go.dev/play/p/o-VSjPjnILI)]\n-   **\u003cbig\u003eRandIntSlice\u003c/big\u003e** : generate a slice of random int. Number range in [min, max)\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandIntSlice)]\n    [[play](https://go.dev/play/p/GATTQ5xTEG8)]\n-   **\u003cbig\u003eRandFromGivenSlice\u003c/big\u003e** : generate a random element from given slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandFromGivenSlice)]\n    [[play](https://go.dev/play/p/UrkWueF6yYo)]\n-   **\u003cbig\u003eRandSliceFromGivenSlice\u003c/big\u003e** : generate a random slice of length num from given slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandSliceFromGivenSlice)]\n    [[play](https://go.dev/play/p/68UikN9d6VT)]\n-   **\u003cbig\u003eRandNumberOfLength\u003c/big\u003e** : generates a random int number of specified length.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/random.md#RandNumberOfLength)]\n    [[play](https://go.dev/play/p/oyZbuV7bu7b)]\n\n\u003ch3 id=\"retry\"\u003e 17. Retry package is for executing a function repeatedly until it was successful or canceled by the context. \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e\u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/retry\"\n```\n\n#### Function list:\n\n-   **\u003cbig\u003eContext\u003c/big\u003e** : set retry context config option.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/retry.md#Context)]\n    [[play](https://go.dev/play/p/xnAOOXv9GkS)]\n-   **\u003cbig\u003eRetry\u003c/big\u003e** : executes the retryFunc repeatedly until it was successful or canceled by the context.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/retry.md#Retry)]\n    [[play](https://go.dev/play/p/nk2XRmagfVF)]\n-   **\u003cbig\u003eRetryFunc\u003c/big\u003e** : function that retry executes.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/retry.md#RetryFunc)]\n    [[play](https://go.dev/play/p/nk2XRmagfVF)]\n-   **\u003cbig\u003eRetryDuration\u003c/big\u003e** : set duration of retry\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/retry.md#RetryDuration)]\n    [[play](https://go.dev/play/p/nk2XRmagfVF)]\n-   **\u003cbig\u003eRetryTimes\u003c/big\u003e** : set times of retry.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/retry.md#RetryTimes)]\n    [[play](https://go.dev/play/p/ssfVeU2SwLO)]\n-   **\u003cbig\u003eBackoffStrategy\u003c/big\u003e** : An interface that defines a method for calculating backoff intervals.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/retry.md#BackoffStrategy)]\n-   **\u003cbig\u003eRetryWithCustomBackoff\u003c/big\u003e** : set abitary custom backoff strategy.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/retry.md#RetryWithCustomBackoff)]\n    [[play](https://go.dev/play/p/jIm_o2vb5Y4)]\n-   **\u003cbig\u003eRetryWithLinearBackoff\u003c/big\u003e** : set linear strategy backoff.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/retry.md#RetryWithLinearBackoff)]\n    [[play](https://go.dev/play/p/PDet2ZQZwcB)]\n-   **\u003cbig\u003eRetryWithExponentialWithJitterBackoff\u003c/big\u003e** : set exponential strategy backoff.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/retry.md#RetryWithExponentialWithJitterBackoff)]\n    [[play](https://go.dev/play/p/xp1avQmn16X)]\n   \n\n\u003ch3 id=\"slice\"\u003e 18. Slice contains some functions to manipulate slice. \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003ca href=\"#index\"\u003eindex\u003c/a\u003e\u003c/h3\u003e\n\n```go\nimport \"github.com/duke-git/lancet/v2/slice\"\n```\n\n#### Function list:\n\n-   **\u003cbig\u003eAppendIfAbsent\u003c/big\u003e** : if the item is absent,append it to the slice.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/slice.md#AppendIfAbsent)]\n    [[play](https://go.dev/play/p/GNdv7Jg2Taj)]\n-   **\u003cbig\u003eContain\u003c/big\u003e** : check if the value is in the slice or not.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/slice.md#Contain)]\n    [[play](https://go.dev/play/p/_454yEHcNjf)]\n-   **\u003cbig\u003eContainBy\u003c/big\u003e** : returns true if predicate function return true.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/slice.md#ContainBy)]\n    [[play](https://go.dev/play/p/49tkHfX4GNc)]\n-   **\u003cbig\u003eContainSubSlice\u003c/big\u003e** : check if the slice contain a given subslice or not.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/slice.md#ContainSubSlice)]\n    [[play](https://go.dev/play/p/bcuQ3UT6Sev)]\n-   **\u003cbig\u003eChunk\u003c/big\u003e** : creates a slice of elements split into groups the length of size.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/slice.md#Chunk)]\n    [[play](https://go.dev/play/p/b4Pou5j2L_C)]\n-   **\u003cbig\u003eCompact\u003c/big\u003e** : creates an slice with all falsy values removed. The values false, nil, 0, and \"\" are falsy.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/slice.md#Compact)]\n    [[play](https://go.dev/play/p/pO5AnxEr3TK)]\n-   **\u003cbig\u003eConcat\u003c/big\u003e** : creates a new slice concatenating slice with any additional slices.\n    [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/slice.md#Concat)]\n    [[play](https://go.dev/play/p/gPt-q7zr5mk)]\n-   **\u003cbig\u003eCount\u003c/big\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduke-git%2Flancet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduke-git%2Flancet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduke-git%2Flancet/lists"}