Skip to content

Commit

Permalink
Merge pull request #4 from kapetan-io/thrawn/logo
Browse files Browse the repository at this point in the history
Added project logo
  • Loading branch information
thrawn01 authored Nov 13, 2024
2 parents 3e45062 + c5b80dd commit d96a03d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: On Pull Request
name: CI

on:
push:
Expand Down
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
# Tackle


<h2 align="center">
<img src="docs/tackle-logo.png" alt="Tackle Box" width="800" /><br />
A tackle box of libraries for golang.
</h2>

[![GitHub tag](https://img.shields.io/github/tag/kapetan-io/tackle?include_prereleases=&sort=semver&color=blue)](https://github.com/kapetan-io/tackel/releases/)
[![CI](https://github.com/kapetan-io/tackle/workflows/CI/badge.svg)](https://github.com/kapetan-io/tackle/actions?query=workflow:"CI")
[![License](https://img.shields.io/badge/License-Apache-blue)](#license)

All packages have ZERO external dependencies outside the standard golang library. The only exception is for tests
which depend upon `github.com/stretchr/testify`. Tackle is intended as a place for small, but useful packages which
any golang developer may find useful, without a needing a dependency review.

## Libraries
- [Set](#set-config-values) - Avoid the if/else spaghetti of configuration defaults
- [Random](#random) - Functions to generate random data for testing
- [Clock](#clock) - Freeze, Set and Advance time during testing
- [Color](#color) - Add colorized output to slog messages
- [AutoTLS](#autotls) - Generate TLS certificates automatically
- [Wait](#wait) - Simple go routine management with fan out and go routine cancellation

## SET config values
Simplify setting default values during configuration.
```go
Expand Down Expand Up @@ -48,7 +64,7 @@ set.IsZero(value)
set.IsZeroValue(reflect.ValueOf(value))
```

## Random
## Random
Is a collection of functions which are useful in testing
```go
package main
Expand Down
Binary file added docs/tackle-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 2 additions & 9 deletions wait/fan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,8 @@ func TestFanOut(t *testing.T) {
close(ch)

var results []int
LOOP:
for {
select {
case v, ok := <-ch:
if !ok {
break LOOP
}
results = append(results, v)
}
for v := range ch {
results = append(results, v)
}
assert.Equal(t, 10, len(results))

Expand Down

0 comments on commit d96a03d

Please sign in to comment.