[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-4668":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":16,"starSnapshotCount":16,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},4668,"go-patterns","tmrts\u002Fgo-patterns","tmrts","Curated list of Go design patterns, recipes and idioms","http:\u002F\u002Ftmrts.com\u002Fgo-patterns",null,"Go",28034,2340,598,17,0,7,22,92,28,45,"Apache License 2.0",false,"master",true,[27,28,29,30,31,32,33],"awesome","design-patterns","design-patterns-for-humans","go","golang","idioms","patterns","2026-06-12 02:01:03","\u003Cp align=\"center\">\n  \u003Cimg src=\"\u002Fgopher.png\" height=\"400\">\n  \u003Ch1 align=\"center\">\n    Go Patterns\n    \u003Cbr>\n    \u003Ca href=\"http:\u002F\u002Ftravis-ci.org\u002Ftmrts\u002Fgo-patterns\">\u003Cimg alt=\"build-status\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fbuild-passing-brightgreen.svg?style=flat-square\" \u002F>\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsindresorhus\u002Fawesome\" >\u003Cimg alt=\"awesome\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fawesome-%E2%9C%93-ff69b4.svg?style=flat-square\" \u002F>\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ftmrts\u002Fgo-patterns\u002Fblob\u002Fmaster\u002FLICENSE\" >\u003Cimg alt=\"license\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-Apache%20License%202.0-E91E63.svg?style=flat-square\" \u002F>\u003C\u002Fa>\n  \u003C\u002Fh1>\n\u003C\u002Fp>\n\nA curated collection of idiomatic design & application patterns for Go language.\n\n## Creational Patterns\n\n| Pattern | Description | Status |\n|:-------:|:----------- |:------:|\n| [Abstract Factory](\u002Fcreational\u002Fabstract_factory.md) | Provides an interface for creating families of releated objects | ✘ |\n| [Builder](\u002Fcreational\u002Fbuilder.md) | Builds a complex object using simple objects | ✔ |\n| [Factory Method](\u002Fcreational\u002Ffactory.md) | Defers instantiation of an object to a specialized function for creating instances | ✔ |\n| [Object Pool](\u002Fcreational\u002Fobject-pool.md) | Instantiates and maintains a group of objects instances of the same type | ✔ |\n| [Singleton](\u002Fcreational\u002Fsingleton.md) | Restricts instantiation of a type to one object | ✔ |\n\n## Structural Patterns\n\n| Pattern | Description | Status |\n|:-------:|:----------- |:------:|\n| [Bridge](\u002Fstructural\u002Fbridge.md) | Decouples an interface from its implementation so that the two can vary independently | ✘ |\n| [Composite](\u002Fstructural\u002Fcomposite.md) | Encapsulates and provides access to a number of different objects | ✘ |\n| [Decorator](\u002Fstructural\u002Fdecorator.md) | Adds behavior to an object, statically or dynamically | ✔ |\n| [Facade](\u002Fstructural\u002Ffacade.md) | Uses one type as an API to a number of others | ✘ |\n| [Flyweight](\u002Fstructural\u002Fflyweight.md) | Reuses existing instances of objects with similar\u002Fidentical state to minimize resource usage | ✘ |\n| [Proxy](\u002Fstructural\u002Fproxy.md) | Provides a surrogate for an object to control it's actions | ✔ |\n\n## Behavioral Patterns\n\n| Pattern | Description | Status |\n|:-------:|:----------- |:------:|\n| [Chain of Responsibility](\u002Fbehavioral\u002Fchain_of_responsibility.md) | Avoids coupling a sender to receiver by giving more than object a chance to handle the request | ✘ |\n| [Command](\u002Fbehavioral\u002Fcommand.md) | Bundles a command and arguments to call later | ✘ |\n| [Mediator](\u002Fbehavioral\u002Fmediator.md) | Connects objects and acts as a proxy | ✘ |\n| [Memento](\u002Fbehavioral\u002Fmemento.md) | Generate an opaque token that can be used to go back to a previous state | ✘ |\n| [Observer](\u002Fbehavioral\u002Fobserver.md) | Provide a callback for notification of events\u002Fchanges to data | ✔ |\n| [Registry](\u002Fbehavioral\u002Fregistry.md) | Keep track of all subclasses of a given class | ✘ |\n| [State](\u002Fbehavioral\u002Fstate.md) | Encapsulates varying behavior for the same object based on its internal state | ✘ |\n| [Strategy](\u002Fbehavioral\u002Fstrategy.md) | Enables an algorithm's behavior to be selected at runtime | ✔ |\n| [Template](\u002Fbehavioral\u002Ftemplate.md) | Defines a skeleton class which defers some methods to subclasses | ✘ |\n| [Visitor](\u002Fbehavioral\u002Fvisitor.md) | Separates an algorithm from an object on which it operates | ✘ |\n\n## Synchronization Patterns\n\n| Pattern | Description | Status |\n|:-------:|:----------- |:------:|\n| [Condition Variable](\u002Fsynchronization\u002Fcondition_variable.md) | Provides a mechanism for threads to temporarily give up access in order to wait for some condition | ✘ |\n| [Lock\u002FMutex](\u002Fsynchronization\u002Fmutex.md) | Enforces mutual exclusion limit on a resource to gain exclusive access | ✘ |\n| [Monitor](\u002Fsynchronization\u002Fmonitor.md) | Combination of mutex and condition variable patterns | ✘ |\n| [Read-Write Lock](\u002Fsynchronization\u002Fread_write_lock.md) | Allows parallel read access, but only exclusive access on write operations to a resource | ✘ |\n| [Semaphore](\u002Fsynchronization\u002Fsemaphore.md) | Allows controlling access to a common resource | ✔ |\n\n## Concurrency Patterns\n\n| Pattern | Description | Status |\n|:-------:|:----------- |:------:|\n| [N-Barrier](\u002Fconcurrency\u002Fbarrier.md) | Prevents a process from proceeding until all N processes reach to the barrier | ✘ |\n| [Bounded Parallelism](\u002Fconcurrency\u002Fbounded_parallelism.md) | Completes large number of independent tasks with resource limits | ✔ |\n| [Broadcast](\u002Fconcurrency\u002Fbroadcast.md) | Transfers a message to all recipients simultaneously | ✘ |\n| [Coroutines](\u002Fconcurrency\u002Fcoroutine.md) | Subroutines that allow suspending and resuming execution at certain locations | ✘ |\n| [Generators](\u002Fconcurrency\u002Fgenerator.md) | Yields a sequence of values one at a time | ✔ |\n| [Reactor](\u002Fconcurrency\u002Freactor.md) | Demultiplexes service requests delivered concurrently to a service handler and dispatches them syncronously to the associated request handlers | ✘ |\n| [Parallelism](\u002Fconcurrency\u002Fparallelism.md) | Completes large number of independent tasks | ✔ |\n| [Producer Consumer](\u002Fconcurrency\u002Fproducer_consumer.md) | Separates tasks from task executions | ✘ |\n\n## Messaging Patterns\n\n| Pattern | Description | Status |\n|:-------:|:----------- |:------:|\n| [Fan-In](\u002Fmessaging\u002Ffan_in.md) | Funnels tasks to a work sink (e.g. server) | ✔ |\n| [Fan-Out](\u002Fmessaging\u002Ffan_out.md) | Distributes tasks among workers (e.g. producer) | ✔ |\n| [Futures & Promises](\u002Fmessaging\u002Ffutures_promises.md) | Acts as a place-holder of a result that is initially unknown for synchronization purposes | ✘ |\n| [Publish\u002FSubscribe](\u002Fmessaging\u002Fpublish_subscribe.md) | Passes information to a collection of recipients who subscribed to a topic | ✔ |\n| [Push & Pull](\u002Fmessaging\u002Fpush_pull.md) | Distributes messages to multiple workers, arranged in a pipeline | ✘ |\n\n## Stability Patterns\n\n| Pattern | Description | Status |\n|:-------:|:----------- |:------:|\n| [Bulkheads](\u002Fstability\u002Fbulkhead.md)  | Enforces a principle of failure containment (i.e. prevents cascading failures) | ✘ |\n| [Circuit-Breaker](\u002Fstability\u002Fcircuit-breaker.md) | Stops the flow of the requests when requests are likely to fail | ✔ |\n| [Deadline](\u002Fstability\u002Fdeadline.md) | Allows clients to stop waiting for a response once the probability of response becomes low (e.g. after waiting 10 seconds for a page refresh) | ✘ |\n| [Fail-Fast](\u002Fstability\u002Ffail_fast.md) | Checks the availability of required resources at the start of a request and fails if the requirements are not satisfied | ✘ |\n| [Handshaking](\u002Fstability\u002Fhandshaking.md) | Asks a component if it can take any more load, if it can't, the request is declined | ✘ |\n| [Steady-State](\u002Fstability\u002Fsteady_state.md) | For every service that accumulates a resource, some other service must recycle that resource | ✘ |\n\n## Profiling Patterns\n\n| Pattern | Description | Status |\n|:-------:|:----------- |:------:|\n| [Timing Functions](\u002Fprofiling\u002Ftiming.md) | Wraps a function and logs the execution | ✔ |\n\n## Idioms\n\n| Pattern | Description | Status |\n|:-------:|:----------- |:------:|\n| [Functional Options](\u002Fidiom\u002Ffunctional-options.md) | Allows creating clean APIs with sane defaults and idiomatic overrides | ✔ |\n\n## Anti-Patterns\n\n| Pattern | Description | Status |\n|:-------:|:----------- |:------:|\n| [Cascading Failures](\u002Fanti-patterns\u002Fcascading_failures.md) | A failure in a system of interconnected parts in which the failure of a part causes a domino effect | ✘ |\n","tmrts\u002Fgo-patterns 是一个精心整理的 Go 语言设计模式、惯用法和编程技巧集合。该项目涵盖了创建型、结构型和行为型三大类设计模式，包括但不限于建造者模式、工厂方法模式、单例模式、装饰器模式、代理模式以及观察者模式等，每种模式都附有详细的描述与实现状态。它旨在帮助开发者更好地理解和应用 Go 语言中的最佳实践，特别适合那些希望提升代码质量和可维护性的 Go 开发者，在构建复杂系统时尤为有用。通过遵循这些模式，可以有效解决常见问题并提高软件架构的设计水平。",2,"2026-06-11 03:00:01","top_language"]