{"id":17908304,"url":"https://github.com/laisky/go-utils","last_synced_at":"2025-03-23T20:31:02.375Z","repository":{"id":41570845,"uuid":"136406091","full_name":"Laisky/go-utils","owner":"Laisky","description":"golang utils","archived":false,"fork":false,"pushed_at":"2025-02-28T05:52:04.000Z","size":2164,"stargazers_count":25,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"v5","last_synced_at":"2025-03-23T19:53:24.937Z","etag":null,"topics":["golang","utils"],"latest_commit_sha":null,"homepage":"","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/Laisky.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":"Laisky98","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2018-06-07T01:39:44.000Z","updated_at":"2024-12-23T13:07:50.000Z","dependencies_parsed_at":"2023-12-26T07:26:48.006Z","dependency_job_id":"d061f320-609b-4f12-a667-7c3b2ce8d5e9","html_url":"https://github.com/Laisky/go-utils","commit_stats":{"total_commits":753,"total_committers":4,"mean_commits":188.25,"dds":0.5431606905710491,"last_synced_commit":"cd071c31a6db0cd41b192518958cfcef59cc684a"},"previous_names":[],"tags_count":178,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laisky%2Fgo-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laisky%2Fgo-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laisky%2Fgo-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Laisky%2Fgo-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Laisky","download_url":"https://codeload.github.com/Laisky/go-utils/tar.gz/refs/heads/v5","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245164814,"owners_count":20571189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["golang","utils"],"created_at":"2024-10-28T19:15:23.457Z","updated_at":"2025-03-23T20:31:02.352Z","avatar_url":"https://github.com/Laisky.png","language":"Go","readme":"# Go-Utils\n\nMany useful golang tools\n\n| Version | Support Go |\n| ------- | ---------- |\n| v1      | \u003e= v1.16   |\n| v2      | \u003e= v1.18   |\n| v3      | \u003e= v1.19   |\n| v4      | \u003e= v1.21   |\n| v5      | \u003e= v1.23   |\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Laisky/go-utils/v5)](https://goreportcard.com/report/github.com/Laisky/go-utils/v5)\n[![GoDoc](https://godoc.org/github.com/Laisky/go-utils/v5?status.svg)](https://pkg.go.dev/github.com/Laisky/go-utils/v5)\n![Build Status](https://github.com/Laisky/go-utils/actions/workflows/test.yml/badge.svg?branch=v3)\n[![codecov](https://codecov.io/gh/Laisky/go-utils/branch/v3/graph/badge.svg)](https://codecov.io/gh/Laisky/go-utils)\n\n## Use as command-line executable binary\n\n### Install\n\n```sh\ngo install github.com/Laisky/go-utils/v5/cmd/gutils@latest\n```\n\nAdd `$HOME/.go/bin` to your PATH.\n\n### Usage\n\n```sh\n# find and delete duplicate files/ similar images\ngutils remove-dup examples/images --dry\n\n# move files to hash-based hierach directories\ngutils md5dir -i examples/md5dir/ --dry\n\n# show x509 certificate details\ngutils certinfo -r blog.laisky.com:443\ngutils certinfo -f ./cert.pem\n\n# encrypt by aes\ngutils encrypt aes -i \u003cfile_path\u003e -s \u003cpassword\u003e\n\n# sign or verify by rsa\ngutils rsa sign\ngutils rsa verify\n```\n\n## Use as SDK\n\n### Install\n\n```sh\ngo get github.com/Laisky/go-utils/v5@latest\n```\n\n### Usage\n\n```go\nimport (\n    gutils \"github.com/Laisky/go-utils/v5\"\n)\n```\n\n### Modules\n\nContains some useful tools in different directories:\n\n- `settings`: move go [github.com/Laisky/go-config](https://github.com/Laisky/go-config)\n- `color.go`: colorful code\n- `compressor.go`: compress and extract dir/files\n- `email/`: SMTP email sdk\n- `encrypt/`: some tools for encrypt and decrypt,\n  support AES, RSA, ECDSA, MD5, SHA128, SHA256\n  - `configserver.go`: load configs from file or config-server\n- `fs.go`: some tools to read, move, walk dir/files\n- `http.go`: some tools to send http request\n- `jwt/`: some tools to generate and parse JWT\n- `log/`: enhanched zap logger\n- `math.go`: some math tools to deal with int, round\n- `net.go`: some tools to deal with tcp/udp\n- `random.go`: generate random string, int\n- `sort.go`: easier to sort\n- `sync.go`: some locks depends on atomic\n- `throttle.go`: faster rate limiter\n- `time.go`: faster clock (if you do not enable vdso)\n- `utils`: some useful tools\n","funding_links":["https://patreon.com/Laisky98"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaisky%2Fgo-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaisky%2Fgo-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaisky%2Fgo-utils/lists"}