Skip to content

[Bug 🐛]: README "Ergonomics" should be updated  #2

@Integralist

Description

@Integralist

What happened?

I tried to follow the example in the README.

What did you expect to happen?

To run the code without error.

Instead you'll see the following error:

WrongTypeArgCount: cannot use generic function option.None without instantiation

This is for the lines that attempt to assign option.Some/option.None to a variable.

Which version of go-functional were you using?

Latest 1.23.4

To Reproduce

package main

import (
	"fmt"

	"github.com/BooleanCat/option"
)

var (
	Some = option.Some
	None = option.None
)

func main() {
	two := Some(2)
	fmt.Println(two)
}

Do you intend to fix this issue yourself?

No.

Additional context

Screenshot 2024-12-20 at 17 08 33

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions