本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/i18n.Init函数的典型用法代码示例。如果您正苦于以下问题:Golang Init函数的具体用法?Golang Init怎么用?Golang Init使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Init函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: initI18nFunc
func initI18nFunc() bool {
errorHandler := func(err error) {
if err != nil {
fmt.Println(FailureColor("FAILED"))
fmt.Println("Error read/writing config: ", err.Error())
os.Exit(1)
}
}
i18n.T = i18n.Init(core_config.NewRepositoryFromFilepath(config_helpers.DefaultFilePath(), errorHandler))
return true
}
开发者ID:vframbach,项目名称:cli,代码行数:11,代码来源:registry.go
示例17: NewCreateQuota
func NewCreateQuota(ui terminal.UI, config configuration.Reader, quotaRepo api.QuotaRepository) CreateQuota {
t, err := i18n.Init("quota", i18n.GetResourcesPath())
if err != nil {
ui.Failed(err.Error())
}
return CreateQuota{
ui: ui,
config: config,
quotaRepo: quotaRepo,
T: t,
}
}
开发者ID:palakmathur,项目名称:cli,代码行数:13,代码来源:create_quota.go
示例18: NewListQuotas
func NewListQuotas(ui terminal.UI, config configuration.Reader, quotaRepo api.QuotaRepository) (cmd *ListQuotas) {
t, err := i18n.Init("quota", i18n.GetResourcesPath())
if err != nil {
ui.Failed(err.Error())
}
return &ListQuotas{
ui: ui,
config: config,
quotaRepo: quotaRepo,
T: t,
}
}
开发者ID:palakmathur,项目名称:cli,代码行数:13,代码来源:quotas.go
示例19: TestApp
func TestApp(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
_ = domain.CreateDomain{}
_ = buildpack.ListBuildpacks{}
_ = organization.ListOrgs{}
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:yousk520,项目名称:cli,代码行数:14,代码来源:app_suite_test.go
示例20: TestPlugin
func TestPlugin(t *testing.T) {
config := configuration.NewRepositoryWithDefaults()
i18n.T = i18n.Init(config, &detection.JibberJabberDetector{})
RegisterFailHandler(Fail)
plugin_builder.BuildTestBinary(filepath.Join("..", "..", "..", "fixtures", "plugins"), "test_with_help")
plugin_builder.BuildTestBinary(filepath.Join("..", "..", "..", "fixtures", "plugins"), "test_with_push")
plugin_builder.BuildTestBinary(filepath.Join("..", "..", "..", "fixtures", "plugins"), "test_with_push_short_name")
plugin_builder.BuildTestBinary(filepath.Join("..", "..", "..", "fixtures", "plugins"), "test_1")
plugin_builder.BuildTestBinary(filepath.Join("..", "..", "..", "fixtures", "plugins"), "test_2")
plugin_builder.BuildTestBinary(filepath.Join("..", "..", "..", "fixtures", "plugins"), "empty_plugin")
plugin_builder.BuildTestBinary(filepath.Join("..", "..", "..", "fixtures", "plugins"), "alias_conflicts")
RunSpecs(t, "Plugin Suite")
}
开发者ID:tools-alexuser01,项目名称:cli,代码行数:16,代码来源:plugin_suite_test.go
注:本文中的github.com/cloudfoundry/cli/cf/i18n.Init函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论