A set of extensions and helpers to Go's standard library.
GTL is a set of extension to the Go's standard library providing some of the most widely used data structures and algorithms written in Go 2.
The package hierarchy is separated into several standalone components offering different set of tools, just like in C++:
- The
containers
submodule offers the objects that store data. It includes ordered collections (vector
,singly linked list
,doubly linked list
), container adaptors (queue
,priority queue
,heap
,stack
), associative containers (set
), simple containers (pair
) and others (bitset
); - The
algo
submodule provides components that perform algorithmic operations on containers and other sequences; - The
funcs
submodule is reach in many helper functions.
The main motivation of this project is to provide Go's ecosystem with an ultimate toolbox for comfortable development process. That is why we decided to use Go 2 alongside with Go's new generics feature to achieve our main goal. Generics enabled us to write elegant, concise and future proof code that can be used as a foundation for many applications of your own.
You must first build go2go
toolchain locally in order to run code from go2
sources. It is available in a branch of the master Go repo. Follow the instructions on installing Go from source. Where those instructions direct you to check out the latest release tag, instead run git checkout dev.go2go
. Then build the Go toolchain as directed.
You can then use the new go2go
tool to build (go tool go2go run .
) and test (go tool go2go test .
) the code.
GTL may also be used alongside with our docker-go2go image that provides precompiled go2go
source out of the box. You may then use go2
command inside the container.
For a complete guide to contributing to GTL, see the Contribution Guide.
Copyright 2020. The GTL Authors. All rights reserved.
Licensed under the MIT license.
Gopher artwork by Ashley McNamara licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 License
modern-dev.com · GitHub @modern-dev