How to Build workflow.Context to execute activity

how to build ctx?

ao := workflow.ActivityOptions{
        TaskQueue:               "sampleTaskQueue",
        ScheduleToCloseTimeout: time.Second * 60,
        ScheduleToStartTimeout: time.Second * 60,
        StartToCloseTimeout:    time.Second * 60,
        HeartbeatTimeout:       time.Second * 10,
        WaitForCancellation:    false,
ctx = workflow.WithActivityOptions(ctx, ao)

var result string
err := workflow.ExecuteActivity(ctx, SimpleActivity, value).Get(ctx, &result)
if err != nil {
        return err

I don’t understand the question. Your sample code is fine.

the context in internal package, I need to create a workflow.Context to execute func

You don’t need to create workflow context explicitly. Workflow function is invoked by the worker when a workflow is executed. For starting workflow the standard context.Context is used.