WIP: feat: translation support
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
See #483
This commit is contained in:
@ -2,11 +2,12 @@ package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"errors"
|
||||
|
||||
"github.com/docker/docker/api/types/filters"
|
||||
"github.com/docker/docker/api/types/swarm"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/leonelquinteros/gotext"
|
||||
)
|
||||
|
||||
func GetConfigs(cl *client.Client, ctx context.Context, server string, fs filters.Args) ([]swarm.Config, error) {
|
||||
@ -31,7 +32,7 @@ func GetConfigNames(configs []swarm.Config) []string {
|
||||
func RemoveConfigs(cl *client.Client, ctx context.Context, configNames []string, force bool) error {
|
||||
for _, confName := range configNames {
|
||||
if err := cl.ConfigRemove(context.Background(), confName); err != nil {
|
||||
return fmt.Errorf("conf %s: %s", confName, err)
|
||||
return errors.New(gotext.Get("conf %s: %s", confName, err))
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user