ericmilaneze / data-structures-and-algorithms-in-go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Data Structures & Algorithms In Go

This repo was created to add examples of data structures and algorithms related or not to them.

It is not supposed to be totally based only on the JavaScript Data Structures & Algorithms + LEETCODE Exercises course, but this course is one of the main inspirations to start this repo. There's this other repo that is completely based on this course (all examples and exercises written in JavaScript).

Data Structures

Run the project

The main file is not doing much, but there are some examples running on it.

go run .

Run the tests

  • All tests with coverage
go test -v -cover ./...
  • Show coverage page
go test -coverprofile=coverage.out ./... && go tool cover -html=coverage.out

Documentation

Public documentation

The public documentation can be found here.

How to generate the public documentation

  • Add a LICENSE to the repo
  • Add tags following the semantic versioning pattern (vX.X.X, e.g. v0.0.1)
  • Run the following command:
GOPROXY=proxy.golang.org && go list -m github.com/ericmilaneze/data-structures-and-algorithms-in-go@v0.1.0

# if using Windows add SET in front of it:
# SET GOPROXY=proxy.golang.org && go list -m github.com/ericmilaneze/data-structures-and-algorithms-in-go@v0.1.0

Godoc (local)

  • Install godoc
go install golang.org/x/tools/cmd/godoc@latest
  • Add godoc to the project
go get golang.org/x/tools/cmd/godoc
  • Run it
godoc -http=:8080

About

License:MIT License


Languages

Language:Go 100.0%