code: func NewAPIClient(ctx *context.Context, client *api.Client) (context.Context, *api.Client, error) {
  	if client == nil {
  		cfg, err := config.LoadConfig()
  		if err != nil {
  			return nil, nil, err
  		}
  		client = api.NewClient(cfg)
  	}
  	var c context.Context
  	if ctx == nil {
  		c = context.Background()
  	} else {
  		c = *ctx
  	}
  	return c, client, nil
  }
docs: // NewAPIClient loads config and creates a new api client