Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change ghproxy.com to gh-proxy.com #443

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func NewRoot(cxt context.Context) (cmd *cobra.Command) {
for _, c := range cmd.Commands() {
registerFlagCompletionFunc(c, "provider", ArrayCompletion(ProviderGitHub, ProviderGitee))
registerFlagCompletionFunc(c, "proxy-github", ArrayCompletion("gh.api.99988866.xyz",
"ghproxy.com"))
"gh-proxy.com"))
registerFlagCompletionFunc(c, "os", ArrayCompletion("window", "linux", "darwin"))
registerFlagCompletionFunc(c, "arch", ArrayCompletion("amd64", "arm64"))
registerFlagCompletionFunc(c, "format", ArrayCompletion("tar.gz", "zip", "msi"))
Expand Down
2 changes: 1 addition & 1 deletion cmd/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (s *searchOption) addFlags(flags *pflag.FlagSet) {
flags.StringVarP(&s.Provider, "provider", "", viper.GetString("provider"), "The file provider")
flags.StringVarP(&s.ProxyGitHub, "proxy-github", "", viper.GetString("proxy-github"),
`The proxy address of github.com, the proxy address will be the prefix of the final address.
Available proxy: gh.api.99988866.xyz, ghproxy.com
Available proxy: gh.api.99988866.xyz, gh-proxy.com
Thanks to https://github.com/hunshcn/gh-proxy`)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (o *setupOption) runE(cmd *cobra.Command, args []string) (err error) {
logger := log.GetLoggerFromContextOrDefault(cmd)

if o.proxy == "" {
if o.proxy, err = selectFromList([]string{"", "ghproxy.com", "gh.api.99988866.xyz"},
if o.proxy, err = selectFromList([]string{"", "gh-proxy.com", "gh.api.99988866.xyz"},
o.v.GetString("proxy-github"),
"Select proxy-github", o.stdio); err != nil {
return
Expand Down
4 changes: 2 additions & 2 deletions pkg/os/generic/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
func TestSliceReplace(t *testing.T) {
installer := &CommonInstaller{}
installer.SetURLReplace(map[string]string{
"https://raw.githubusercontent.com": "https://ghproxy.com/https://raw.githubusercontent.com",
"https://raw.githubusercontent.com": "https://gh-proxy.com/https://raw.githubusercontent.com",
})

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

// an empty slice
noProxyInstaller := &CommonInstaller{}
Expand Down
Loading