Discover Packages
github.com/qingshanyinyin/go-extend
module
Version:
v0.0.0-...-261b507
Opens a new window with list of versions in this module.
Published: Feb 27, 2019
License: GPL-3.0
Opens a new window with license information.
README
README
¶
go-extend
go语言扩展包,收集一些常用的操作函数,辅助更快的完成开发工作,并减少重复代码。
规范:
包名统一使用 ex
前缀, 避免与官方包冲突。
包目录下 doc.go
作为包说明文档。
标准库函数改进性能测试:
exstrings
goos: darwin
goarch: amd64
pkg: github.com/thinkeridea/go-extend/exstrings/benchmark
BenchmarkReplace-8 500000 3256 ns/op 960 B/op 15 allocs/op
BenchmarkReplaceToBytes-8 500000 3283 ns/op 1024 B/op 16 allocs/op
BenchmarkUnsafeReplaceToBytes-8 500000 3041 ns/op 960 B/op 15 allocs/op
BenchmarkStandardLibraryReplace-8 500000 3679 ns/op 1920 B/op 30 allocs/op
PASS
ok github.com/thinkeridea/go-extend/exstrings/benchmark 7.769s
goos: darwin
goarch: amd64
pkg: github.com/thinkeridea/go-extend/exstrings/benchmark
BenchmarkRepeat-8 50000 28818 ns/op 303104 B/op 1 allocs/op
BenchmarkRepeatToBytes-8 50000 28104 ns/op 303104 B/op 1 allocs/op
BenchmarkStandardLibraryRepeat-8 20000 51968 ns/op 606208 B/op 2 allocs/op
PASS
ok github.com/thinkeridea/go-extend/exstrings/benchmark 6.200s
goos: darwin
goarch: amd64
pkg: github.com/thinkeridea/go-extend/exstrings/benchmark
BenchmarkJoin-8 5000000 290 ns/op 64 B/op 1 allocs/op
BenchmarkJoinToBytes-8 5000000 290 ns/op 64 B/op 1 allocs/op
BenchmarkStandardLibraryJoin-8 5000000 315 ns/op 128 B/op 2 allocs/op
PASS
ok github.com/thinkeridea/go-extend/exstrings/benchmark 5.406s
版权:
所有包统一使用 GNU General Public License v3.0
协议,每个源码文件开头必须包含以下版权描述:
// Copyright (C) <year> <name of author> <email>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
Expand ▾
Collapse ▴
Directories
¶
Package exatomic 实现了 float32 与 float64 原子操作, 我在历史项目中实时在线统计一些价格,在多线程时往往非常有用, 简化程序逻辑,并提升程序性能。
Package exatomic 实现了 float32 与 float64 原子操作, 我在历史项目中实时在线统计一些价格,在多线程时往往非常有用, 简化程序逻辑,并提升程序性能。
Package exbytes 收集常规的 []byte 操作,作为 go 标准库 bytes 的扩展。
Package exbytes 收集常规的 []byte 操作,作为 go 标准库 bytes 的扩展。
Package exnet 收集一些网络模块函数
exhttp/expprof
Package expprof 这是从 net/http/pprof 包复制过来的,做了一些调整 我希望核心的逻辑不变,保持和标准库一致的功能,会调整使用的接口,使之易于控制。
Package expprof 这是从 net/http/pprof 包复制过来的,做了一些调整 我希望核心的逻辑不变,保持和标准库一致的功能,会调整使用的接口,使之易于控制。
Package exstrings 收集常规的 string 操作,作为 go 标准库 strings 的扩展。
Package exstrings 收集常规的 string 操作,作为 go 标准库 strings 的扩展。
Package helper 收集一些可以辅助我们快速编程的方法,让我们极快的编写出自己的应用程序。
Package helper 收集一些可以辅助我们快速编程的方法,让我们极快的编写出自己的应用程序。
Package pool 创建一些常用的 pool, 底层依托 sync.pool 在项目开发中会大量使用 sync.Pool, 有很多 pool 是可以共享的,最常见的就是 bytes.Buffer。
Package pool 创建一些常用的 pool, 底层依托 sync.pool 在项目开发中会大量使用 sync.Pool, 有很多 pool 是可以共享的,最常见的就是 bytes.Buffer。
Click to show internal directories.
Click to hide internal directories.