本文整理匯總了Golang中github.com/cloudfoundry/cli/cf/i18n.Init函數的典型用法代碼示例。如果您正苦於以下問題:Golang Init函數的具體用法?Golang Init怎麽用?Golang Init使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了Init函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: TestServicebroker
func TestServicebroker(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config)
RegisterFailHandler(Fail)
RunSpecs(t, "Servicebroker Suite")
}
示例2: TestPluginRepo
func TestPluginRepo(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config)
RegisterFailHandler(Fail)
RunSpecs(t, "PluginRepo Suite")
}
示例3: setupDependencies
func setupDependencies() (deps *cliDependencies) {
deps = new(cliDependencies)
deps.termUI = terminal.NewUI(os.Stdin)
deps.manifestRepo = manifest.NewManifestDiskRepository()
deps.configRepo = configuration.NewRepositoryFromFilepath(configuration.DefaultFilePath(), func(err error) {
if err != nil {
deps.termUI.Failed(fmt.Sprintf("Config error: %s", err))
}
})
i18n.T = i18n.Init(deps.configRepo)
terminal.UserAskedForColors = deps.configRepo.ColorEnabled()
terminal.InitColorSupport()
if os.Getenv("CF_TRACE") != "" {
trace.Logger = trace.NewLogger(os.Getenv("CF_TRACE"))
} else {
trace.Logger = trace.NewLogger(deps.configRepo.Trace())
}
deps.gateways = map[string]net.Gateway{
"auth": net.NewUAAGateway(deps.configRepo),
"cloud-controller": net.NewCloudControllerGateway(deps.configRepo, time.Now),
"uaa": net.NewUAAGateway(deps.configRepo),
}
deps.apiRepoLocator = api.NewRepositoryLocator(deps.configRepo, deps.gateways)
return
}
示例4: TestEnvironmentvariablegroup
func TestEnvironmentvariablegroup(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config, &detection.JibberJabberDetector{})
RegisterFailHandler(Fail)
RunSpecs(t, "Environmentvariablegroup Suite")
}
示例5: TestEnvironmentVariableGroups
func TestEnvironmentVariableGroups(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config)
RegisterFailHandler(Fail)
RunSpecs(t, "EnvironmentVariableGroups Suite")
}
示例6: TestFeatureflag
func TestFeatureflag(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config)
RegisterFailHandler(Fail)
RunSpecs(t, "FeatureFlag Suite")
}
示例7: TestCommandFactory
func TestCommandFactory(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config)
RegisterFailHandler(Fail)
RunSpecs(t, "Command Factory Suite")
}
示例8: TestSecurityGroupSpaces
func TestSecurityGroupSpaces(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config)
RegisterFailHandler(Fail)
RunSpecs(t, "SecurityGroupSpaces Suite")
}
示例9: TestCopyApplicationSource
func TestCopyApplicationSource(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config, &detection.JibberJabberDetector{})
RegisterFailHandler(Fail)
RunSpecs(t, "CopyApplicationSource Suite")
}
示例10: TestServicekey
func TestServicekey(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config, &detection.JibberJabberDetector{})
RegisterFailHandler(Fail)
RunSpecs(t, "Servicekey Suite")
}
示例11: TestAuthentication
func TestAuthentication(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config)
RegisterFailHandler(Fail)
RunSpecs(t, "Authentication Suite")
}
示例12: TestPluginRepo
func TestPluginRepo(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config, &detection.JibberJabberDetector{})
_ = plugin_repo.RepoPlugins{}
RegisterFailHandler(Fail)
RunSpecs(t, "PluginRepo Suite")
}
示例13: TestApp
func TestApp(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config, &detection.JibberJabberDetector{})
RegisterFailHandler(Fail)
plugin_builder.BuildTestBinary(filepath.Join("..", "..", "fixtures", "plugins"), "test_1")
plugin_builder.BuildTestBinary(filepath.Join("..", "..", "fixtures", "plugins"), "test_2")
RunSpecs(t, "App Suite")
}
示例14: TestCommands
func TestCommands(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config, &detection.JibberJabberDetector{})
_ = commands.Api{}
RegisterFailHandler(Fail)
RunSpecs(t, "Commands Suite")
}
示例15: TestBuildpack
func TestBuildpack(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config, &detection.JibberJabberDetector{})
//make a reference to something in cf/commands/domain, so all init() in the directory will run
_ = buildpack.ListBuildpacks{}
RegisterFailHandler(Fail)
RunSpecs(t, "Buildpack Suite")
}