| 780 | type WebActionAnnotationMethod func(annotations whisk.KeyValueArr) whisk.KeyValueArr |
| 781 | |
| 782 | func webActionAnnotations( |
| 783 | preserveAnnotations bool, |
| 784 | annotations whisk.KeyValueArr, |
| 785 | entityName string, |
| 786 | webActionAnnotationMethod WebActionAnnotationMethod, |
| 787 | existingAction *whisk.Action) (whisk.KeyValueArr, error) { |
| 788 | |
| 789 | if preserveAnnotations && existingAction != nil { |
| 790 | annotations = whisk.KeyValueArr.AppendKeyValueArr(annotations, existingAction.Annotations) |
| 791 | } |
| 792 | |
| 793 | annotations = webActionAnnotationMethod(annotations) |
| 794 | |
| 795 | return annotations, nil |
| 796 | } |
| 797 | |
| 798 | func addWebAnnotations(annotations whisk.KeyValueArr) whisk.KeyValueArr { |
| 799 | annotations = deleteWebAnnotationKeys(annotations) |