MCPcopy Index your code
hub / github.com/bytedance/gopkg

github.com/bytedance/gopkg @v0.1.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.4 ↗ · + Follow
2,099 symbols 7,983 edges 141 files 859 documented · 41% 95 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

gopkg

Go Reference

gopkg is a universal utility collection for Go, it complements offerings such as Boost, Better std, Cloud tools.

Table of Contents

Introduction

gopkg is a universal utility collection for Go, it complements offerings such as Boost, Better std, Cloud tools. It is migrated from the internal code base at ByteDance and has been extensively adopted in production.

We depend on the same code(this repo) in our production environment.

Catalogs

  • cache: Caching Mechanism
  • cloud: Cloud Computing Design Patterns
  • collection: Data Structures
  • lang: Enhanced Standard Libraries
  • util: Utilities Useful across Domains

Releases

gopkg recommends using the latest tagged version for stability. We develop on the main branch and create tagged releases when stable.

How To Use

You can use go get -u github.com/bytedance/gopkg@latest to get or update gopkg.

License

gopkg is licensed under the terms of the Apache license 2.0. See LICENSE for more information.

Extension points exported contracts — how you extend this code

Metricer (Interface)
Metricer metrics errors, timeouts and successes [2 implementers]
cloud/circuitbreaker/interface.go
AsyncCache (Interface)
AsyncCache . [1 implementers]
cache/asynccache/asynccache.go
Channel (Interface)
Channel is a safe and feature-rich alternative for Go chan struct [1 implementers]
lang/channel/channel.go
Logger (Interface)
Logger is a logger interface that provides logging function with levels. [1 implementers]
util/logger/logger.go
HTTPHeaderSetter (Interface)
HTTPHeaderSetter sets a key with a value into a HTTP header.
cloud/metainfo/http.go
Pool (Interface)
(no doc) [1 implementers]
util/gopool/pool.go
Panel (Interface)
Panel is what users should use. [1 implementers]
cloud/circuitbreaker/interface.go
Option (FuncType)
Option define channel Option
lang/channel/channel.go

Core symbols most depended-on inside this repo

ReadUnaligned64
called by 417
internal/runtimex/readunaligned.go
Get
called by 406
cloud/circuitbreaker/counter.go
Lock
called by 245
lang/syncx/pool.go
Unlock
called by 224
lang/syncx/pool.go
atomicLoadNext
called by 190
collection/skipmap/types.go
Equal
called by 173
internal/assert/assert.go
atomicLoadNext
called by 171
collection/skipset/types.go
Uint32n
called by 151
lang/fastrand/fastrand.go

Shape

Method 1,076
Function 816
Struct 159
TypeAlias 27
Interface 14
FuncType 7

Languages

Go100%

Modules by API surface

collection/skipmap/types.go455 symbols
collection/skipset/types.go360 symbols
collection/hashset/types.go72 symbols
util/logger/logger.go46 symbols
collection/zset/zset_test.go37 symbols
cloud/circuitbreaker/interface.go36 symbols
cloud/metainfo/info_test.go31 symbols
lang/channel/channel.go30 symbols
collection/zset/skiplist.go27 symbols
cloud/circuitbreaker/per_p_metricer.go26 symbols
cloud/circuitbreaker/metricer.go25 symbols
util/logger/default.go24 symbols

For agents

$ claude mcp add gopkg \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact