本文整理汇总了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")
}