mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	remove util.OptionalBool and related functions (#29513)
and migrate affected code _last refactoring bits to replace **util.OptionalBool** with **optional.Option[bool]**_
This commit is contained in:
		| @@ -15,6 +15,7 @@ import ( | ||||
| 	packages_model "code.gitea.io/gitea/models/packages" | ||||
| 	"code.gitea.io/gitea/modules/json" | ||||
| 	"code.gitea.io/gitea/modules/log" | ||||
| 	"code.gitea.io/gitea/modules/optional" | ||||
| 	packages_module "code.gitea.io/gitea/modules/packages" | ||||
| 	helm_module "code.gitea.io/gitea/modules/packages/helm" | ||||
| 	"code.gitea.io/gitea/modules/setting" | ||||
| @@ -42,7 +43,7 @@ func Index(ctx *context.Context) { | ||||
| 	pvs, _, err := packages_model.SearchVersions(ctx, &packages_model.PackageSearchOptions{ | ||||
| 		OwnerID:    ctx.Package.Owner.ID, | ||||
| 		Type:       packages_model.TypeHelm, | ||||
| 		IsInternal: util.OptionalBoolFalse, | ||||
| 		IsInternal: optional.Some(false), | ||||
| 	}) | ||||
| 	if err != nil { | ||||
| 		apiError(ctx, http.StatusInternalServerError, err) | ||||
| @@ -110,7 +111,7 @@ func DownloadPackageFile(ctx *context.Context) { | ||||
| 			Value:      ctx.Params("package"), | ||||
| 		}, | ||||
| 		HasFileWithName: filename, | ||||
| 		IsInternal:      util.OptionalBoolFalse, | ||||
| 		IsInternal:      optional.Some(false), | ||||
| 	}) | ||||
| 	if err != nil { | ||||
| 		apiError(ctx, http.StatusInternalServerError, err) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user