Skip to content

Commit 99f3f9e

Browse files
committed
actor: fix example test function naming convention
This commit updates the example test function names to follow Go's convention for example functions. The functions were renamed from ExampleBasicActor and ExampleStructActor to Example_basicActor and Example_structActor respectively. This naming convention with an underscore ensures that the examples are still recognized as valid example functions by the Go testing framework while avoiding potential naming conflicts with actual types in the package.
1 parent c0e211e commit 99f3f9e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

actor/example_basic_actor_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ type BasicGreetingResponse struct {
2323
Greeting string
2424
}
2525

26-
// ExampleBasicActor demonstrates creating a single actor, sending it a message
26+
// Example_basicActor demonstrates creating a single actor, sending it a message
2727
// directly using Ask, and then unregistering and stopping it.
28-
func ExampleBasicActor() {
28+
func Example_basicActor() {
2929
system := actor.NewActorSystem()
3030
defer system.Shutdown()
3131

actor/example_struct_actor_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ func (s *StatefulCounterActor) Receive(ctx context.Context,
6868
return fn.Err[CounterResponse](fmt.Errorf("invalid CounterMsg"))
6969
}
7070

71-
// ExampleStructActor demonstrates creating an actor whose behavior is defined
71+
// Example_structActor demonstrates creating an actor whose behavior is defined
7272
// by a struct with methods, allowing it to maintain internal state.
73-
func ExampleStructActor() {
73+
func Example_structActor() {
7474
system := actor.NewActorSystem()
7575
defer system.Shutdown()
7676

0 commit comments

Comments
 (0)