ostree: rename request parameters type

It's in the ostree package, so it doesn't need to have OSTree in the
name.
This commit is contained in:
Achilleas Koutsou 2022-01-14 20:20:29 +01:00 committed by Ondřej Budai
parent db345d75dd
commit b92754b135
2 changed files with 4 additions and 4 deletions

View file

@ -15,7 +15,7 @@ import (
var ostreeRefRE = regexp.MustCompile(`^(?:[\w\d][-._\w\d]*\/)*[\w\d][-._\w\d]*$`)
type OSTreeRequest struct {
type RequestParams struct {
URL string `json:"url"`
Ref string `json:"ref"`
Parent string `json:"parent"`
@ -54,8 +54,8 @@ func ResolveRef(location, ref string) (string, error) {
return parent, nil
}
func ResolveParams(params OSTreeRequest, imageType distro.ImageType) (OSTreeRequest, error) {
resolved := OSTreeRequest{}
func ResolveParams(params RequestParams, imageType distro.ImageType) (RequestParams, error) {
resolved := RequestParams{}
resolved.Ref = params.Ref
// if ref is not provided, use distro default
if resolved.Ref == "" {