GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Rehtt/Kit: Go 通用基础库

BranchesTags
Open more actions menu

Latest commit

 

History

313 Commits
313 Commits

Folders and files

NameName
Last commit message
Last commit date
browser
browser
 
 
buf
buf
 
 
bytes
bytes
 
 
cache
cache
 
 
channel
channel
 
 
cli
cli
 
 
db
db
 
 
expiredMap
expiredMap
 
 
file
file
 
 
generate/simple-template
generate/simple-template
 
 
heap
heap
 
 
host
host
 
 
http
http
 
 
i18n
i18n
 
 
link
link
 
 
log
log
 
 
maps
maps
 
 
metadata/png
metadata/png
 
 
multiplex
multiplex
 
 
net
net
 
 
queue
queue
 
 
random
random
 
 
requester
requester
 
 
slice
slice
 
 
strings
strings
 
 
struct
struct
 
 
sudo
sudo
 
 
tail
tail
 
 
util
util
 
 
value
value
 
 
vt
vt
 
 
web
web
 
 
wireguard
wireguard
 
 
yaml
yaml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
README_cn.md
README_cn.md
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 

Repository files navigation

Kit

Go Report Card Go Reference License GitHub release Go version Ask DeepWiki

🛠️ Go Universal Toolkit - A feature-rich, high-performance Go toolkit collection that provides simple, efficient, and practical tool modules to help developers quickly build high-quality projects.

中文文档 | English

✨ Features

  • 🚀 High Performance: Performance-optimized implementations
  • 🧩 Modular Design: Independent modules, use as needed
  • 🔧 Easy to Use: Simple API design, quick to get started
  • 🛡️ Type Safe: Full utilization of Go's type system
  • 📦 Zero Dependencies: Most modules have no external dependencies
  • 🔄 Actively Maintained: Active development and maintenance

📦 Installation

# Latest version (recommended)
go get github.com/Rehtt/Kit@latest

# Compatible with older Go versions
go get github.com/Rehtt/[email protected]

Requirements: Go 1.21+ (recommended) or Go 1.17+

🚀 Quick Start

Web Server Example

package main

import (
	"fmt"
	"github.com/Rehtt/Kit/web"
	"net/http"
)

func main() {
	// Create web instance
	app := web.New()

	// Route definition
	app.Get("/hello/:name", func(ctx *web.Context) {
		name := ctx.GetUrlPathParam("name")
		ctx.JSON(200, map[string]string{
			"message": fmt.Sprintf("Hello, %s!", name),
			"status":  "success",
		})
	})

	// Middleware support
	app.Use(func(ctx *web.Context) {
		ctx.Writer.Header().Set("X-Powered-By", "Kit")
		ctx.Next()
	})

	// Start server
	fmt.Println("Server starting on :8080")
	http.ListenAndServe(":8080", app)
}

Logging Example

package main

import "github.com/Rehtt/Kit/log"

func main() {
	// Basic logging
	log.Info("Application started")
	log.Error("Error occurred", "error", err)
	
	// Structured logging
	log.With("user_id", 123).Info("User logged in")
}

Cache Example

package main

import (
	"github.com/Rehtt/Kit/cache"
	"time"
)

func main() {
	// Create cache instance
	c := cache.New()
	
	// Set cache
	c.Set("key", "value", 5*time.Minute)
	
	// Get cache
	if value, ok := c.Get("key"); ok {
		fmt.Println("Cache value:", value)
	}
}

🧩 Module Overview

Kit contains multiple independent modules that you can use as needed:

Core Modules

Module Description Features
web Lightweight web framework Routing, middleware, JSON support
log High-performance logging library Structured logging, multiple levels, high performance
cache Universal cache interface In-memory cache, TTL support
db Database tools Condition building, query construction
http HTTP client Request wrapper, retry mechanism

Utility Modules

Module Description Features
file File operation tools File I/O, path handling
strings String utilities High-performance conversion, string processing
random Random number generation Random strings, number generation
util General utilities Snowflake ID, time tools
struct Struct tools Comparison, tag reading, conversion

Data Structure Modules

Module Description Features
maps Thread-safe Map Concurrent safe, high performance
queue Queue implementation Multiple queue types
slice Slice utilities Slice operations, functional programming
heap Heap data structure Priority queue, heap sort
expiredMap Expiring Map Auto expiration, memory management

Network & System Modules

Module Description Features
net Network tools Network detection, IP processing
host Host information System info retrieval
browser Browser tools Browser launch, control
wireguard WireGuard tools VPN configuration, management

Other Utility Modules

Module Description Features
i18n Internationalization support Multi-language, localization
yaml YAML processing Configuration file parsing
cli Command line tools CLI application building
generate Code generation Template generation, code generation
vt Virtual terminal Terminal control, color output
multiplex Multiplexing Connection multiplexing, load balancing

📖 Documentation

Each module has detailed documentation and examples. Visit the corresponding module directory:

  • 📚 API Documentation
  • 🔧 Usage Examples
  • 📝 Changelog

🛠️ Development Guide

Requirements

  • Go 1.21+ (recommended)
  • Git

Local Development

# Clone the project
git clone https://github.com/Rehtt/Kit.git
cd Kit

# Run tests
go test ./...

# Build project
go build ./...

Code Standards

  • Follow Go official code standards
  • Use gofmt to format code
  • Write unit tests
  • Add necessary documentation comments

🤝 Contributing

We welcome and appreciate all forms of contributions!

How to Contribute

  1. 🍴 Fork this project
  2. 🔧 Create a feature branch (git checkout -b feature/amazing-feature)
  3. 💾 Commit your changes (git commit -m 'Add some amazing feature')
  4. 📤 Push to the branch (git push origin feature/amazing-feature)
  5. 🔄 Create a Pull Request

Contribution Guidelines

  • Submit Issues to report bugs or suggest new features
  • Create Pull Requests to contribute code
  • Improve documentation and examples
  • Share usage experiences and best practices

📊 Project Status

  • ✅ Actively Maintained: Regular updates and maintenance
  • 🔄 Continuous Integration: Automated testing and building
  • 📈 Continuous Improvement: Ongoing optimization based on community feedback
  • 🛡️ Stable & Reliable: Proven in production environments

🙏 Acknowledgments

Thanks to all developers who have contributed to the Kit project!

📄 License

This project is open source under the MIT License.


If this project helps you, please give us a ⭐️ Star!

Made with ❤️ by Rehtt

About

Go 通用基础库

Resources

Readme
MIT license
Activity

Stars

4 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.