Skip to content

deliveryhero/spring-cloud-config-client-go

Repository files navigation

Version GolangCI Lint Golang Tests pre-commit Test Coverage

spring-cloud-config-client-go

Spring Cloud Config Client is GO client for Spring Cloud Config. Supports Property Overrides feature.

Sample Usage

package main

import (
	"fmt"

	configclient "github.com/deliveryhero/spring-cloud-config-client-go/springconfigclient"
)

func main() {
	c := configclient.RemoteConfig{
		Url:      "https://remote-url.com",
		Username: "username",
		Password: "pass",
	}
	a := configclient.New("sample-api", "prod", "0.0.1", &c)

	if err := a.Sync(); err != nil {
		fmt.Println("Error: ", err)
	}

	fmt.Println("ENV_KEY value is: ", a.GetEnv("ENV_KEY"))
}

Installation

You can add this package via;

go get github.com/deliveryhero/spring-cloud-config-client-go

Tests

To run tests, use rake test or;

go test -p 1 -v -race ./...

Publishing New Release

Prerequisites

  • You need to be in main branch
  • You need to be ready to bump to a new version

Use rake publish[revision] task to bump new version and push newly created tag and updated code to remote and verify go package. (all in one!)

  • rake publish: 0.0.0 -> 0.0.1, default revision is patch
  • rake publish[minor]: 0.0.0 -> 0.1.0
  • rake publish[major]: 0.0.0 -> 1.0.0

Contributor(s)


Contribute

All PR’s are welcome!

  1. fork (https://github.com/deliveryhero/spring-cloud-config-client-go/fork)
  2. Create your branch (git checkout -b my-feature)
  3. commit yours (git commit -am 'add some functionality')
  4. push your branch (git push origin my-feature)
  5. Than create a new Pull Request!

This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

About

Spring Cloud Config Client

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •