github.com/lyft/flytestdlib@v0.3.12-0.20210213045714-8cdd111ecda1/README.md (about)

     1  Common Go Tools
     2  =====================
     3  [![Current Release](https://img.shields.io/github/release/lyft/flytestdlib.svg)](https://github.com/lyft/flytestdlib/releases/latest)
     4  [![Build Status](https://travis-ci.org/lyft/flytestdlib.svg?branch=master)](https://travis-ci.org/lyft/flytestdlib)
     5  [![GoDoc](https://godoc.org/github.com/lyft/flytestdlib?status.svg)](https://godoc.org/github.com/lyft/flytestdlib)
     6  [![License](https://img.shields.io/badge/LICENSE-Apache2.0-ff69b4.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
     7  [![CodeCoverage](https://img.shields.io/codecov/c/github/lyft/flytestdlib.svg)](https://codecov.io/gh/lyft/flytestdlib)
     8  [![Go Report Card](https://goreportcard.com/badge/github.com/lyft/flytestdlib)](https://goreportcard.com/report/github.com/lyft/flytestdlib)
     9  ![Commit activity](https://img.shields.io/github/commit-activity/w/lyft/flytestdlib.svg?style=plastic)
    10  ![Commit since last releast](https://img.shields.io/github/commits-since/lyft/flytestdlib/latest.svg?style=plastic)
    11  
    12  Shared components we found ourselves building time and time again, so we collected them in one place!
    13  
    14  This library consists of:
    15   - config
    16  
    17     Enables strongly typed config throughout your application. Offers a way to represent config in go structs. takes care of parsing, validating and watching for changes on config.
    18  
    19   - cli/pflags
    20  
    21     Tool to generate a pflags for all fields in a given struct.
    22  
    23     #### Install
    24  
    25     On POSIX systems, run: `curl -sfL https://raw.githubusercontent.com/lyft/flytestdlib/godownloader/godownloader.sh | sh`
    26  
    27     On Windows:
    28  
    29     Install scoop: `iex (new-object net.webclient).downloadstring('https://get.scoop.sh')`
    30  
    31     Run: `scoop bucket add flytestdlib https://github.com/lyft/flytestdlib.git`
    32  
    33     Run: `scoop install pflags`
    34  
    35   - storage
    36  
    37     Abstract storage library that uses stow behind the scenes to connect to s3/azure/gcs but also offers configurable factory, in-memory storage (for testing) as well as native protobuf support.
    38  
    39   - contextutils
    40  
    41     Wrapper around golang's context to set/get known keys.
    42  
    43   - logger
    44  
    45     Wrapper around logrus that's configurable, taggable and context-aware.
    46  
    47   - profutils
    48  
    49     Starts an http server that serves /metrics (exposes prometheus metrics), /healthcheck and /version endpoints.
    50  
    51   - promutils
    52  
    53     Exposes a Scope instance that's a more convenient way to construct prometheus metrics and scope them per component.
    54  
    55   - atomic
    56  
    57     Wrapper around sync.atomic library to offer AtomicInt32 and other convenient types.
    58  
    59   - sets
    60  
    61     Offers strongly types and convenient interface sets.
    62  
    63   - utils
    64   - version
    65  
    66  Contributing
    67  ------------
    68  
    69  ## Versioning
    70  
    71  This repo follows [semantic versioning](https://semver.org/).
    72  
    73  ## Releases
    74  
    75  This repository is hooked up with [goreleaser](https://goreleaser.com/). Maintainers are expected to create tags and let goreleaser compose the release message and create a release.
    76  
    77  To create a new release, follow these steps:
    78  
    79  - Create a PR with your changes.
    80  
    81  - [Optional] Create an alpha tag on your branch and push that.
    82  
    83    - First get existing tags `git describe --abbrev=0 --tags`
    84  
    85    - Figure out the next alpha version (e.g. if tag is v1.2.3 then you should create a v1.2.4-alpha.0 tag)
    86  
    87    - Create a tag `git tag v1.2.4-alpha.0`
    88  
    89    - Push tag `git push --tags`
    90  
    91  - Merge your changes and checkout master branch `git checkout master && git pull`
    92  
    93  - Bump version tag and push to branch.
    94  
    95    - First get existing tags `git describe --abbrev=0 --tags`
    96  
    97    - Figure out the next release version (e.g. if tag is v1.2.3 then you should create a v1.2.4 tag or v1.3.0 or a v2.0.0 depending on what has changed. Refer to [Semantic Versioning](https://semver.org/) for information about when to bump each)
    98  
    99    - Create a tag `git tag v1.2.4`
   100  
   101    - Push tag `git push --tags`
   102