out

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package out out

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

type Format string

Format for the output

const (
	// Stdout stdout
	Stdout Format = "stdout"
	// Csv csv
	Csv Format = "csv"
	// JSON json
	JSON Format = "json"
)

type SmexWriter

type SmexWriter struct {
	Format Format
	// contains filtered or unexported fields
}

SmexWriter writes records to different formats. Returns a particular writer based on the type

func NewMultiWriter

func NewMultiWriter(fs afero.Fs, w io.Writer, outFormat string) *SmexWriter

NewMultiWriter returns a new SmexWriter that can be configured to write to multiple destinations.

func NewWriter

func NewWriter(fs afero.Fs, w io.Writer) *SmexWriter

NewWriter returns a new SmexWriter that writes to stdout

func (SmexWriter) Write

func (w SmexWriter) Write(urls []xml.URL, loc bool, filename string) error

write a slice of URL

Directories

Path Synopsis
Package csv csv
Package csv csv
Package json json
Package json json
Package stdout stdout
Package stdout stdout

Jump to

Keyboard shortcuts

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