{"id":18021284,"url":"https://github.com/gakkiyomi/galang","last_synced_at":"2025-10-03T17:12:47.418Z","repository":{"id":51302354,"uuid":"292868038","full_name":"gakkiyomi/galang","owner":"gakkiyomi","description":"Some utils for the Go: network,network address,string,algorithms/structure,array/silce,一款包含了网络地址相关，字符串相关，算法和数据结构的 Go 语言常用工具库。","archived":false,"fork":false,"pushed_at":"2024-09-24T08:54:55.000Z","size":5450,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T10:34:43.028Z","etag":null,"topics":["go-subnetutils","network","network-segment","nmap","snmp"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gakkiyomi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2020-09-04T14:26:20.000Z","updated_at":"2024-09-24T08:54:59.000Z","dependencies_parsed_at":"2023-11-25T11:30:00.578Z","dependency_job_id":"c704569e-2d07-446d-b5e9-04c1cc202c77","html_url":"https://github.com/gakkiyomi/galang","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gakkiyomi/galang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gakkiyomi%2Fgalang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gakkiyomi%2Fgalang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gakkiyomi%2Fgalang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gakkiyomi%2Fgalang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gakkiyomi","download_url":"https://codeload.github.com/gakkiyomi/galang/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gakkiyomi%2Fgalang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270586496,"owners_count":24611318,"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","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["go-subnetutils","network","network-segment","nmap","snmp"],"created_at":"2024-10-30T06:09:24.703Z","updated_at":"2025-10-03T17:12:47.348Z","avatar_url":"https://github.com/gakkiyomi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## 💡 简介\n\n[Galang](https://github.com/gakkiyomi/galang) Some utils for the Go: network address,string,algorithms/structure,array/silce\n\n\u003e **[中文说明](README.zh-CN.md)**\n\n## use\n\n   1. use go.mod\n   2. `GOPROXY=direct go get -u github.com/gakkiyomi/galang`\n\n## ✨ Feature List\n\n### Network `net.Network`\n\n* Get Local IP\n* Get Internet IP\n* JAVA Apache SubnetUtils go version\n* Convert the number of mask bits by subnet mask\n* Convert the subnet mask by the number of mask bits\n* Long type IP to IP string\n* IP string to Long type IP\n* Determine whether an IP address is range of a network segment\n* Get local machine uuid (only linux)\n* Get all available addresses under a network segment (excluding broadcast addresses and network addresses)\n* IP longest prefix matching algorithm (LPM)\n* Get the network bit and broadcast bit of the network segment\n* Get the first available address and the last available address in a network segment\n* Get the number of available addresses in a network segment\n\n### SNMP `net.SNMP`\n\n* Get system information (host name, system description, running time since snmp started, contact person, physical location, vendor)\n* Get interface information (IP address, subnet mask, current interface status, MAC address)\n\n### NMAP `net.NMAP`\n\n* NMAP-based network scanner (support scanning network segment or range ip to obtain host ip and port opening and closing status)\n\n### String `string.String`\n\n* Does the string begin with xx\n* Does the string end with xx\n* Judgment contains string ignore case\n* Determine whether the string is a blank string\n* Determine whether the string has contains any blank string\n* Java StringBuilder in go\n\n### Array `array.Array`\n\n* Insert an element at the specified position in the array\n* Array deduplication\n* String to String array\n* Reverse array/silce\n* Get max value from int array\n* Get min value from int array\n* Get unionsection from int array\n* Get unionsection from string array\n* Get intersection from int array\n* Get intersection from string array\n* Get complement from int array\n* Get complement from string array\n* BinarySerch(array must be sorted by asc)\n\n### Structure `structure`\n\n* Stack\n* Queue\n* RingBuffer\n* BitMap\n* Trie\n* BinaryTree **No guarantee of balance**\n* BalancedBinaryTree\n  * AVLTree\n  * RedBlackTree\n* Heap\n  * MaxHeap\n  * MinHeap\n* Graph [TODO]\n\n### Sort `sort`\n\n* Quick Sort\n* Selection Sort\n* Insertion Sort\n* Quick Sort\n* Heap Sort\n* Merge Sort\n* Shell Sort\n* Bucket Sort\n\n### Config `config`\n\n* Read configuration file in JSON format\n* Read configuration file in XML format\n* TODO | Read configuration file in YAML format\n\n### File `file.File`\n\n* Get file size\n* Check the path exists\n* Check the file content is in JSON format\n* Check the file content is in XML format\n* Check the file stream content is in JSON format\n* Check the file stream content is in XML format\n\n### Transform `utils.Transform`\n\n* Convert between string and other types\n\n### UUID `utils.UUID`\n\n* Generate a UUID\n* check if UUID is legal\n\n### 🔑 JetBrains OS licenses\n\n`galang` had been being developed with `GoLand IDE` under the free JetBrains Open Source license(s) granted by JetBrains s.r.o., hence I would like to express my thanks here.\n\n\u003ca href=\"https://www.jetbrains.com/?from=galang\" target=\"_blank\"\u003e\u003cimg src=\"https://b3logfile.com/file/2021/05/jetbrains-variant-2-42d96aa4.png\" width=\"250\" align=\"middle\"/\u003e\u003c/a\u003e\n\n## Thanks\n\n[gosnmp # good SNMP client](https://github.com/alouca/gosnmp)\n\n[nmap # great NMAP client](https://github.com/Ullaakut/nmap)\n\n[dmidecode # dmidecode library](https://github.com/dselans/dmidecode)\n\n[etree # xml parse library](https://github.com/beevik/etree)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgakkiyomi%2Fgalang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgakkiyomi%2Fgalang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgakkiyomi%2Fgalang/lists"}