Skip to content

Commit

Permalink
update: 修复阿里云翻译引擎地区默认值;
Browse files Browse the repository at this point in the history
  • Loading branch information
speauty committed May 25, 2023
1 parent ec658ab commit f805565
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ tidy:

BinName=anto-v3.4.2-windows.exe

deploy: rs build compress
deploy: rs build

rs:
rsrc -manifest ./cmd/anto/anto.manifest -ico favicon.ico -o ./cmd/anto/rsrc.syso
rsrc -manifest ./cmd/anto/anto.manifest -ico ./resource/favicon.ico -o ./cmd/anto/rsrc.syso

build:
go build -gcflags='-l -N' -ldflags='-w -s -H=windowsgui' -o "./bin/${BinName}" anto/cmd/anto
Expand Down
11 changes: 8 additions & 3 deletions domain/service/translator/ali_cloud_mt/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ func (config *Config) SyncDisk(currentViper *viper.Viper) error {
return nil
}

func (config *Config) GetAK() string { return config.AKId }
func (config *Config) GetSK() string { return config.AKSecret }
func (config *Config) GetRegion() string { return config.Region }
func (config *Config) GetAK() string { return config.AKId }
func (config *Config) GetSK() string { return config.AKSecret }
func (config *Config) GetRegion() string {
if config.Region != "" {
return config.Region
}
return "cn-hangzhou"
}

func (config *Config) GetQPS() int { return config.QPS }
func (config *Config) GetMaxCharNum() int { return config.MaxCharNum }
Expand Down

0 comments on commit f805565

Please sign in to comment.