Introduce a commercial license option alongside AGPL-3.0-only, require a CLA for contributors, and document the terms in COMMERCIAL.md and NOTICE. Add a script to stamp SPDX headers on Go files and apply it across the tree.
28 lines
688 B
Go
28 lines
688 B
Go
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
// SPDX-FileCopyrightText: 2025-2026 Christian Galo
|
|
|
|
package example
|
|
|
|
import (
|
|
"context"
|
|
"log/slog"
|
|
)
|
|
|
|
// Activities holds dependencies specific to the Example domain.
|
|
type Activities struct {
|
|
Logger *slog.Logger
|
|
}
|
|
|
|
// NewActivities creates a new Activities instance.
|
|
func NewActivities(logger *slog.Logger) *Activities {
|
|
return &Activities{
|
|
Logger: logger,
|
|
}
|
|
}
|
|
|
|
// ExampleActivity is a domain-specific activity.
|
|
func (a *Activities) ExampleActivity(ctx context.Context, input string) (string, error) {
|
|
a.Logger.Info("executing example activity", slog.String("input", input))
|
|
return "processed: " + input, nil
|
|
}
|