go-cfenv | Go Cloud Foundry Environment Parsing Package
kandi X-RAY | go-cfenv Summary
kandi X-RAY | go-cfenv Summary
cfenv is a package to assist you in writing Go apps that run on Cloud Foundry. It provides convenience functions and structures that map to Cloud Foundry environment variable primitives (
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- New creates a new app
- WithLabel finds services with label .
- mapEnv returns a map of key - value pairs .
- splitEnv splits item into key and value parts .
- Env returns a map of environment variables .
- Current returns a new app
- IsRunningOnCF checks if CF is running on CFX
- CurrentEnv gets the current environment .
go-cfenv Key Features
go-cfenv Examples and Code Snippets
package main
import (
"github.com/cloudfoundry-community/go-cfenv"
)
func main() {
appEnv, _ := cfenv.Current()
fmt.Println("ID:", appEnv.ID)
fmt.Println("Index:", appEnv.Index)
fmt.Println("Name:", appEnv.Name)
fmt.Println("Host:", appEnv.H
Community Discussions
Trending Discussions on go-cfenv
QUESTION
The go command go get github.com/cloudnativego/gogo-service/service
failed first, but then passed on the second run.
Entire sequence of events:
...ANSWER
Answered 2017-Nov-07 at 19:02This is caused by the repository in question using external libraries (in the vendor directory) as submodules, rather than as static vendoring, but not configuring those submodules within the .gitmodules file (which actually appears to be completely absent from that repo). There is a known issue with go get
and submodules:
You may be able to file an issue on the repository in question and suggest they move to a static vendoring model (or use govendor's fetch
utility or similar with an ignored /vendor/*/
pattern). They aren't the first repo to run into this issue:
- https://github.com/digitalocean/doctl/issues/150
- https://github.com/go-mgo/mgo/issues/307
- https://github.com/ipfs/fs-repo-migrations/issues/26
Even github itself seems to generally recommend against using submodules anymore:
https://github.com/blog/2104-working-with-submodules
Before you add a repository as a submodule, first check to see if you have a better alternative available. Git submodules work well enough for simple cases, but these days there are often better tools available for managing dependencies than what Git submodules can offer.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install go-cfenv
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page