Skip to content

Commit

Permalink
doc: clarify a sentence (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
seborama authored Mar 16, 2023
1 parent 5c9fab7 commit 0aecf41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ Some tests (e.g. `TestCollector_Filtering`) are using receiver Getter methods in

A method Getter is typically defined as `func (T) Property() R {...}`.

While `Property()` does not take any argument, Go allows `T.Property` be called as `T.Property(t)`, where `t` is the receiver. This is a `func(T) R` and hence a `Function[T, R any]`.
With `t` as the receiver, Go allows `t.Property()` be called as `T.Property(t)`. This is a `func(T) R` and hence a `Function[T, R any]`.

Example - `TestCollector_Filtering`:

Expand Down

0 comments on commit 0aecf41

Please sign in to comment.