code: func (ap *AccountPermissions) Clone() AccountPermissions {
  	// clone base permissions
  	basePermissionsClone := ap.Base
  	var rolesClone []string
  	// It helps if we normalise empty roles to []string(nil) rather than []string{}
  	if len(ap.Roles) > 0 {
  		// clone roles []string
  		rolesClone = make([]string, len(ap.Roles))
  		// strings are immutable so copy suffices
  		copy(rolesClone, ap.Roles)
  	}
  
  	return AccountPermissions{
  		Base:  basePermissionsClone,
  		Roles: rolesClone,
  	}
  }
docs: // Clone clones the account permissions