()
| 53 | } |
| 54 | |
| 55 | func (a *Action) String() string { |
| 56 | var builder strings.Builder |
| 57 | builder.WriteString(string(a.Type)) |
| 58 | if a.Type == ActionTypeLoadURL { |
| 59 | _, _ = fmt.Fprintf(&builder, " %s", a.Input) |
| 60 | } |
| 61 | if a.Element != nil { |
| 62 | _, _ = fmt.Fprintf(&builder, " on %s", a.Element) |
| 63 | } |
| 64 | value := builder.String() |
| 65 | return value |
| 66 | } |
| 67 | |
| 68 | type ActionType string |
| 69 |
no outgoing calls