oo

package
v0.0.0-...-e3c9958 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func CSVRead

func CSVRead(reader *csv.Reader) (rows []map[string]string, err error)

CSVRead

Example
s := "name,age\nalice,18\nbob,20"
rows, err := CSVRead(csv.NewReader(strings.NewReader(s)))

fmt.Println(rows[0]["name"], rows[1]["age"], err)
Output:

alice 20 <nil>

func CSVReadFromFile

func CSVReadFromFile(filename string) (rows []map[string]string, err error)

CSVReadFromFile

func CSVReadFromString

func CSVReadFromString(s string) (rows []map[string]string, err error)

CSVReadFromString

Types

type R

type R[V any] struct {
	// contains filtered or unexported fields
}

func ErrOf

func ErrOf(err error) *R[any]

func ResultOf

func ResultOf[V any](v V, err error) *R[V]

func (*R[V]) Must

func (r *R[V]) Must() V

func (*R[V]) V

func (r *R[V]) V() V

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL