csv

package module
v0.0.0-...-c12096d Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: MIT Imports: 6 Imported by: 0

README

xk6-csv

A k6 extension enables k6 tests to comfortably parse CSV values.

The underlying implementation is https://github.com/gocarina/gocsv

Built for k6 using xk6.

Usage

Import an entire module's contents:

import * as CSV from "k6/x/csv";

Import a single export from a module:

import { parse } from "k6/x/csv";

API

Functions:

For complete API documentation click here!

Build

To build a k6 binary with this extension, first ensure you have the prerequisites:

Then:

  1. Install xk6:
$ go install go.k6.io/xk6/cmd/xk6@latest
  1. Build the binary:
$ xk6 build --with github.com/szkiba/xk6-csv@latest

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidSeparator = errors.New("invalid separator")

Functions

This section is empty.

Types

type Module

type Module struct{}

func New

func New() *Module

func (*Module) Parse

func (m *Module) Parse(text string, separator []byte) (interface{}, error)

Jump to

Keyboard shortcuts

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