Replies: 27 comments 13 replies
-
fsnotify 文件系统事件监听通知fsnotify is a Go library to provide cross-platform filesystem notifications on fsnotify requires Go 1.16 or newer. API docs: https://pkg.go.dev/github.com/fsnotify/fsnotify UsageA basic example: package main
import (
"log"
"github.com/fsnotify/fsnotify"
)
func main() {
watcher, err := fsnotify.NewWatcher()
if err != nil {
log.Fatal(err)
}
defer watcher.Close()
done := make(chan bool)
go func() {
for {
select {
case event, ok := <-watcher.Events:
if !ok {
return
}
log.Println("event:", event)
if event.Has(fsnotify.Write) {
log.Println("modified file:", event.Name)
}
case err, ok := <-watcher.Errors:
if !ok {
return
}
log.Println("error:", err)
}
}
}()
err = watcher.Add("/tmp")
if err != nil {
log.Fatal(err)
}
<-done
} A slightly more expansive example can be found in cmd/fsnotify,
|
Beta Was this translation helpful? Give feedback.
-
fasthttpFast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http Fast HTTP implementation for Go. fasthttp might not be for you!fasthttp was design for some high performance edge cases. Unless your server/client needs to handle thousands of small to medium requests per seconds and needs a consistent low millisecond response time fasthttp might not be for you. For most cases |
Beta Was this translation helpful? Give feedback.
-
GoDS (Go Data Structures)GoDS (Go Data Structures) - Sets, Lists, Stacks, Maps, Trees, Queues, and much more 实现了常见的数据结构,可直接引入到实际的项目中使用,包含链表、栈、哈希表、树等等 |
Beta Was this translation helpful? Give feedback.
-
cobra命令行程序库可以用来编写命令行程序。同时,它也提供了一个脚手架, 用于生成基于 cobra 的应用程序框架。非常多知名的开源项目使用了 cobra 库构建命令行,如Kubernetes、Hugo、etcd等等等等。 Cobra is a library for creating powerful modern CLI applications. Cobra is used in many Go projects such as Kubernetes, OverviewCobra is a library providing a simple interface to create powerful modern CLI Cobra provides:
|
Beta Was this translation helpful? Give feedback.
-
gorilla/muxPackage The name mux stands for "HTTP request multiplexer". Like the standard
|
Beta Was this translation helpful? Give feedback.
-
爬虫 gocolly/collyLightning Fast and Elegant Scraping Framework for Gophers Colly provides a clean interface to write any kind of crawler/scraper/spider. With Colly you can easily extract structured data from websites, which can be used for a wide range of applications, like data mining, data processing or archiving. |
Beta Was this translation helpful? Give feedback.
-
GoReleaserDeliver Go binaries as fast and easily as possible. GoReleaser builds Go binaries for several platforms, creates a GitHub release and then |
Beta Was this translation helpful? Give feedback.
-
golang/crypto密码库This repository holds supplementary Go cryptography libraries.
|
Beta Was this translation helpful? Give feedback.
-
About DelveDelve is a debugger for the Go programming language. The goal of the project is to provide a simple, full featured debugging tool for Go. Delve should be easy to invoke and easy to use. Chances are if you're using a debugger, things aren't going your way. With that in mind, Delve should stay out of your way as much as possible. Delve整体架构采用Serve/Client
Delve用法
$ CFG_APPID=xxx CFG_USER_ID=xxx CFG_USER_KEY=xxx CFG_ENV=dev dlv debug -- -conf rpc_go_dev.yaml dlv debug
编译并开始调试 dlv attach
链接到正在运行中的进程并开始调试 这个命令将使Delve控制一个已经运行的进程,并开始一个新的调试会话。退出调试会话时,您可以选择让进程继续或终止它。 |
Beta Was this translation helpful? Give feedback.
-
LogrusLogrus is a structured logger for Go (golang), completely API compatible with the standard library logger. |
Beta Was this translation helpful? Give feedback.
-
goroutine pool 协程池goroutine虽然非常的轻量,但是滥用或者使用不规范也会导致系统资源浪费,甚至耗尽! |
Beta Was this translation helpful? Give feedback.
-
gjson
get json values quickly GJSON is a Go package that provides a fast and simple way to get values from a json document. Also check out SJSON for modifying json, and the JJ command line tool. This README is a quick overview of how to use GJSON, for more information check out GJSON Syntax. |
Beta Was this translation helpful? Give feedback.
-
sjson
set a json value quickly SJSON is a Go package that provides a very fast and simple way to set a value in a json document. For a command line interface check out JJ. |
Beta Was this translation helpful? Give feedback.
-
jj
JJ is a command line utility that provides a fast and simple way to retrieve or update values from JSON documents. It's fast because it avoids parsing irrelevant sections of json, skipping over values that do not apply, and aborts as soon as the target value has been found or updated. |
Beta Was this translation helpful? Give feedback.
-
easyjsonPackage easyjson provides a fast and easy way to marshal/unmarshal Go structs to/from JSON without the use of reflection. In performance tests, easyjson outperforms the standard easyjson aims to keep generated Go code simple enough so that it can be easily optimized or fixed. Another goal is to provide users with the ability to customize the generated code by providing options not available with the standard |
Beta Was this translation helpful? Give feedback.
-
Air☁️ Live reload for Go apps English | 简体中文 MotivationWhen I get started with developing websites in Go and gin framework, it's a pity Air is yet another live-reloading command line utility for Go applications in development. Just NOTE: This tool has nothing to do with hot-deploy for production. Features
|
Beta Was this translation helpful? Give feedback.
-
FreshFresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file. If the web framework you are using supports the Fresh runner, it will show build errors on your browser. It currently works with Traffic, Martini and gocraft/web. |
Beta Was this translation helpful? Give feedback.
-
samber/lo✨ 该项目开始时是对新泛型实现的实验。它在某些方面可能看起来像Lodash。我曾经使用神奇的"go-funk" 包编写代码,但是“go-funk”使用反射,因此不是类型安全的。 正如预期的那样,基准测试表明泛型比基于“反射”包的实现要快得多。与纯for循环相比,基准测试也显示出类似的性能提升。 将来,会有5到10个helper与Go标准库中的helper重叠(包名为“slices”和“maps”)。我觉得这个库是合法的,并且提供了许多更有价值的抽象。 See also:
Why this name? I wanted a short name, similar to "Lodash" and no Go package currently uses this name. |
Beta Was this translation helpful? Give feedback.
-
json-iterator/go高性能、可插拔、100%兼容和替换标准库
|
Beta Was this translation helpful? Give feedback.
-
errgrouperrgroup包为一组处理公共任务的子任务协程提供 同步、错误传播和上下文取消能力。 |
Beta Was this translation helpful? Give feedback.
-
Go 时间 开源库 |
Beta Was this translation helpful? Give feedback.
-
Go语言爱好者周刊Go语言爱好者周刊旨在为大家分享一周值得了解、学习的 Go语言相关内容。每周日发布。 |
Beta Was this translation helpful? Give feedback.
-
filetypefiletype可以根据文件的魔数(magic numbers)签名来推断文件的类型和 MIME 类型。它支持多种常见的文件类型,包括图片、视频、音频、文档、压缩包等。它还提供了一些便捷的函数和类型匹配器,可以方便地对文件进行分类和筛选。 特性:
|
Beta Was this translation helpful? Give feedback.
-
mimetypemimetypeA package for detecting MIME types and extensions based on magic numbersGoroutine safe, extensible, no C bindings特性
|
Beta Was this translation helpful? Give feedback.
-
sourcegraph/conc
|
Beta Was this translation helpful? Give feedback.
-
gopsutil process and system utilities一个跨平台库,用于查询进程和系统利用率(CPU、内存、磁盘、网络、传感器)的信息 |
Beta Was this translation helpful? Give feedback.
-
gopkg.in/yaml.v3YAML support for the Go language |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
开源库
Beta Was this translation helpful? Give feedback.
All reactions