diff --git a/workflows/concepts/tasks.mdx b/workflows/concepts/tasks.mdx index 5f8481c..b2332bc 100644 --- a/workflows/concepts/tasks.mdx +++ b/workflows/concepts/tasks.mdx @@ -30,7 +30,9 @@ func (t *MyFirstTask) Execute(ctx context.Context) error { ``` -This example demonstrates a simple task that prints "Hello World!" to the console. The key components of this task are: +This example demonstrates a simple task that prints "Hello World!" to the console. + +For python, the key components of this task are: @@ -44,6 +46,17 @@ This example demonstrates a simple task that prints "Hello World!" to the consol +For Go, the key components are: + + + + `MyFirstTask` is a struct that implements the `Task` interface. It represents the task to be executed. + + + The `Execute` method is the entry point for executing the task. This is where the task's logic is defined. It's invoked by a [task runner](/workflows/concepts/task-runners) when the task runs and performs the task's operation. + + + The code samples on this page do not illustrate how to execute the task. That will be covered in the [next section on task runners](/workflows/concepts/task-runners). The reason for that is that executing tasks is a separate concern from implementing tasks.