Skip to content

Commit 207db33

Browse files
authored
change ghproxy.com to gh-proxy.com (#443)
1 parent 29520bf commit 207db33

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func NewRoot(cxt context.Context) (cmd *cobra.Command) {
5151
for _, c := range cmd.Commands() {
5252
registerFlagCompletionFunc(c, "provider", ArrayCompletion(ProviderGitHub, ProviderGitee))
5353
registerFlagCompletionFunc(c, "proxy-github", ArrayCompletion("gh.api.99988866.xyz",
54-
"ghproxy.com"))
54+
"gh-proxy.com"))
5555
registerFlagCompletionFunc(c, "os", ArrayCompletion("window", "linux", "darwin"))
5656
registerFlagCompletionFunc(c, "arch", ArrayCompletion("amd64", "arm64"))
5757
registerFlagCompletionFunc(c, "format", ArrayCompletion("tar.gz", "zip", "msi"))

cmd/search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (s *searchOption) addFlags(flags *pflag.FlagSet) {
4242
flags.StringVarP(&s.Provider, "provider", "", viper.GetString("provider"), "The file provider")
4343
flags.StringVarP(&s.ProxyGitHub, "proxy-github", "", viper.GetString("proxy-github"),
4444
`The proxy address of github.com, the proxy address will be the prefix of the final address.
45-
Available proxy: gh.api.99988866.xyz, ghproxy.com
45+
Available proxy: gh.api.99988866.xyz, gh-proxy.com
4646
Thanks to https://github.com/hunshcn/gh-proxy`)
4747
}
4848

cmd/setup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (o *setupOption) runE(cmd *cobra.Command, args []string) (err error) {
4242
logger := log.GetLoggerFromContextOrDefault(cmd)
4343

4444
if o.proxy == "" {
45-
if o.proxy, err = selectFromList([]string{"", "ghproxy.com", "gh.api.99988866.xyz"},
45+
if o.proxy, err = selectFromList([]string{"", "gh-proxy.com", "gh.api.99988866.xyz"},
4646
o.v.GetString("proxy-github"),
4747
"Select proxy-github", o.stdio); err != nil {
4848
return

pkg/os/generic/common_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
func TestSliceReplace(t *testing.T) {
1111
installer := &CommonInstaller{}
1212
installer.SetURLReplace(map[string]string{
13-
"https://raw.githubusercontent.com": "https://ghproxy.com/https://raw.githubusercontent.com",
13+
"https://raw.githubusercontent.com": "https://gh-proxy.com/https://raw.githubusercontent.com",
1414
})
1515

1616
// a normal case
@@ -19,7 +19,7 @@ func TestSliceReplace(t *testing.T) {
1919
"https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh",
2020
})
2121
assert.Equal(t, []string{"abc",
22-
"https://ghproxy.com/https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"}, result)
22+
"https://gh-proxy.com/https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"}, result)
2323

2424
// an empty slice
2525
noProxyInstaller := &CommonInstaller{}

0 commit comments

Comments
 (0)