INNER CODE UNIT · Go

conflictManaged

theopenlane/core · cmd/catalog/main.go:278

func conflictManaged(ctx context.Context, sc stripeClient, c catalog.LookupKeyConflict) (bool, error) {
	switch c.Resource {
	case "product":
		prod, err := sc.GetProduct(ctx, c.ID)
		if err != nil {
			return false, err
		}

		if prod != nil && prod.Metadata != nil {
			return prod.Metadata[catalog.ManagedByKey] == catalog.ManagedByValue, nil
		}
	case "feature":
		feat, err := sc.GetFeatureByLookupKey(ctx, c.LookupKey)
		if err != nil {
			return false, err
		}

		if feat != nil && feat.Metadata != nil {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…