github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/utils/utils.go (about)

     1  package utils
     2  
     3  import "fmt"
     4  
     5  func DeleteNotPassParams(params *map[string]interface{}, not_pass_params []string) {
     6  	for _, i := range not_pass_params {
     7  		delete(*params, i)
     8  	}
     9  }
    10  
    11  // GenerateEpsIDQuery is used to generate a request URL with enterprise_project_id
    12  func GenerateEpsIDQuery(epsID string) string {
    13  	if len(epsID) == 0 {
    14  		return ""
    15  	}
    16  	return fmt.Sprintf("?enterprise_project_id=%s", epsID)
    17  }