當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。