Skip to content

Commit

Permalink
Add Codeclimate to README
Browse files Browse the repository at this point in the history
  • Loading branch information
dewey committed Aug 23, 2018
1 parent 2b85d47 commit 9cbe0b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

[![Build Status](https://travis-ci.com/dewey/feedbridge.svg?branch=master)](https://travis-ci.com/dewey/feedbridge)
[![Go Report Card](https://goreportcard.com/badge/github.com/dewey/feedbridge)](https://goreportcard.com/report/github.com/dewey/feedbridge)
[![Maintainability](https://api.codeclimate.com/v1/badges/50d72195e5d1f42d21b1/maintainability)](https://codeclimate.com/github/dewey/feedbridge/maintainability)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/dewey/feedbridge/LICENSE)
[![Badges](https://img.shields.io/badge/badges-all%20of%20them-brightgreen.svg)](https://github.com/dewey/feedbridge)

Expand Down
17 changes: 9 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ import (
cache "github.com/patrickmn/go-cache"
)

var config struct {
RefreshInterval int `env:"REFRESH_INTERVAL" envDefault:"15"`
CacheExpiration int `env:"CACHE_EXPIRATION" envDefault:"30"`
CacheExpiredPurge int `env:"CACHE_EXPIRED_PURGE" envDefault:"60"`
Environment string `env:"ENVIRONMENT" envDefault:"develop"`
Port int `env:"PORT" envDefault:"8080"`
APIHostname string `env:"API_HOSTNAME" envDefault:"http://localhost"`
}

func main() {
var config struct {
RefreshInterval int `env:"REFRESH_INTERVAL" envDefault:"15"`
CacheExpiration int `env:"CACHE_EXPIRATION" envDefault:"30"`
CacheExpiredPurge int `env:"CACHE_EXPIRED_PURGE" envDefault:"60"`
Environment string `env:"ENVIRONMENT" envDefault:"develop"`
Port int `env:"PORT" envDefault:"8080"`
APIHostname string `env:"API_HOSTNAME" envDefault:"http://localhost"`
}
err := env.Parse(&config)
if err != nil {
panic(err)
Expand Down

0 comments on commit 9cbe0b7

Please sign in to comment.