Skip to content

Commit 76cbef4

Browse files
authored
Merge pull request #106 from c-tonneslan/docs/option-typos
docs: fix two typos in option.go
2 parents a721a40 + bcb7355 commit 76cbef4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

option.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func (o Option[T]) OrEmpty() T {
142142
return o.value
143143
}
144144

145-
// ForEach executes the given side-effecting function of value is present.
145+
// ForEach executes the given side-effecting function if value is present.
146146
func (o Option[T]) ForEach(onValue func(value T)) {
147147
if o.isPresent {
148148
onValue(o.value)
@@ -324,7 +324,7 @@ func (o *Option[T]) Scan(src any) error {
324324
return nil
325325
}
326326

327-
// is is only possible to assert interfaces, so convert first
327+
// it is only possible to assert interfaces, so convert first
328328
// https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md#why-not-permit-type-assertions-on-values-whose-type-is-a-type-parameter
329329
var t T
330330
if tScanner, ok := interface{}(&t).(sql.Scanner); ok {

0 commit comments

Comments
 (0)