当前位置: 首页>>代码示例>>Golang>>正文


Golang i18n.Init函数代码示例

本文整理汇总了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")
}
开发者ID:pcf-toronto-ci-bot,项目名称:cli,代码行数:7,代码来源:servicebroker_suite_test.go

示例2: TestPluginRepo

func TestPluginRepo(t *testing.T) {
	config := configuration.NewRepositoryWithDefaults()
	i18n.T = i18n.Init(config)

	RegisterFailHandler(Fail)
	RunSpecs(t, "PluginRepo Suite")
}
开发者ID:Reejoshi,项目名称:cli,代码行数:7,代码来源:plugin_repo_suite_test.go

示例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
}
开发者ID:matanzit,项目名称:cli,代码行数:33,代码来源:main.go

示例4: TestEnvironmentvariablegroup

func TestEnvironmentvariablegroup(t *testing.T) {
	config := configuration.NewRepositoryWithDefaults()
	i18n.T = i18n.Init(config, &detection.JibberJabberDetector{})

	RegisterFailHandler(Fail)
	RunSpecs(t, "Environmentvariablegroup Suite")
}
开发者ID:tools-alexuser01,项目名称:cli,代码行数:7,代码来源:environmentvariablegroup_suite_test.go

示例5: TestEnvironmentVariableGroups

func TestEnvironmentVariableGroups(t *testing.T) {
	config := configuration.NewRepositoryWithDefaults()
	i18n.T = i18n.Init(config)

	RegisterFailHandler(Fail)
	RunSpecs(t, "EnvironmentVariableGroups Suite")
}
开发者ID:Reejoshi,项目名称:cli,代码行数:7,代码来源:environment_variable_groups_suite_test.go

示例6: TestFeatureflag

func TestFeatureflag(t *testing.T) {
	config := configuration.NewRepositoryWithDefaults()
	i18n.T = i18n.Init(config)

	RegisterFailHandler(Fail)
	RunSpecs(t, "FeatureFlag Suite")
}
开发者ID:Reejoshi,项目名称:cli,代码行数:7,代码来源:featureflag_suite_test.go

示例7: TestCommandFactory

func TestCommandFactory(t *testing.T) {
	config := configuration.NewRepositoryWithDefaults()
	i18n.T = i18n.Init(config)

	RegisterFailHandler(Fail)
	RunSpecs(t, "Command Factory Suite")
}
开发者ID:matanzit,项目名称:cli,代码行数:7,代码来源:command_factory_suite_test.go

示例8: TestSecurityGroupSpaces

func TestSecurityGroupSpaces(t *testing.T) {
	config := configuration.NewRepositoryWithDefaults()
	i18n.T = i18n.Init(config)

	RegisterFailHandler(Fail)
	RunSpecs(t, "SecurityGroupSpaces Suite")
}
开发者ID:Reejoshi,项目名称:cli,代码行数:7,代码来源:suite_test.go

示例9: TestCopyApplicationSource

func TestCopyApplicationSource(t *testing.T) {
	config := configuration.NewRepositoryWithDefaults()
	i18n.T = i18n.Init(config, &detection.JibberJabberDetector{})

	RegisterFailHandler(Fail)
	RunSpecs(t, "CopyApplicationSource Suite")
}
开发者ID:tools-alexuser01,项目名称:cli,代码行数:7,代码来源:copy_application_source_suite_test.go

示例10: TestServicekey

func TestServicekey(t *testing.T) {
	config := configuration.NewRepositoryWithDefaults()
	i18n.T = i18n.Init(config, &detection.JibberJabberDetector{})

	RegisterFailHandler(Fail)
	RunSpecs(t, "Servicekey Suite")
}
开发者ID:tools-alexuser01,项目名称:cli,代码行数:7,代码来源:servicekey_suite_test.go

示例11: TestAuthentication

func TestAuthentication(t *testing.T) {
	config := configuration.NewRepositoryWithDefaults()
	i18n.T = i18n.Init(config)

	RegisterFailHandler(Fail)
	RunSpecs(t, "Authentication Suite")
}
开发者ID:Reejoshi,项目名称:cli,代码行数:7,代码来源:authentication_suite_test.go

示例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")
}
开发者ID:zachgersh,项目名称:cf-cli,代码行数:9,代码来源:plugin_repo_suite_test.go

示例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")
}
开发者ID:tools-alexuser01,项目名称:cli,代码行数:9,代码来源:app_suite_test.go

示例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")
}
开发者ID:zachgersh,项目名称:cf-cli,代码行数:9,代码来源:commands_suite_test.go

示例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")
}
开发者ID:yousk520,项目名称:cli,代码行数:10,代码来源:buildpack_suite_test.go


注:本文中的github.com/cloudfoundry/cli/cf/i18n.Init函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。