refactor: clean code

This commit is contained in:
Fu Diwei
2024-10-29 21:32:48 +08:00
parent aeaa45b713
commit 26fa8e75bd
19 changed files with 192 additions and 172 deletions

View File

@@ -24,7 +24,9 @@ type QiniuCDNDeployer struct {
func NewQiniuCDNDeployer(option *DeployerOption) (*QiniuCDNDeployer, error) {
access := &domain.QiniuAccess{}
json.Unmarshal([]byte(option.Access), access)
if err := json.Unmarshal([]byte(option.Access), access); err != nil {
return nil, fmt.Errorf("failed to get access: %w", err)
}
return &QiniuCDNDeployer{
option: option,