writer

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: BSD-3-Clause Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const STDOUT string = "-"
View Source
const WRITER_SCHEME string = "wof-cli"

Variables

This section is empty.

Functions

func NewWriter added in v0.6.0

func NewWriter(ctx context.Context, uri string) (wof_writer.Writer, error)

NewWriter returns a `Writer` instance implementing the `whosonfirst/go-writer/v3.Writer` interface.

func Write

func Write(ctx context.Context, uri string, body []byte) error

Write writes the data in 'body' to 'uri'.

func WriteReader added in v0.6.0

func WriteReader(ctx context.Context, uri string, r io.Reader) error

Write writes the data in 'r' to 'uri'.

Types

type Writer added in v0.6.0

type Writer struct {
	wof_writer.Writer
}

Writer implements the `whosonfirst/go-writer/v3.Writer` interface.

func (*Writer) Close added in v0.6.0

func (wr *Writer) Close(ctx context.Context) error

Close is a no-op to conform to the `Writer` instance and returns nil.

func (*Writer) Flush added in v0.6.0

func (wr *Writer) Flush(ctx context.Context) error

Flush is a no-op to conform to the `Writer` instance and returns nil.

func (*Writer) SetLogger added in v0.6.0

func (wr *Writer) SetLogger(ctx context.Context, logger *log.Logger) error

SetLogger is a no-op to conform to the `Writer` instance and returns nil.

func (*Writer) Write added in v0.6.0

func (wr *Writer) Write(ctx context.Context, path string, r io.ReadSeeker) (int64, error)

Write copies the content of 'fh' to 'path' using an `io.Discard` writer.

func (*Writer) WriterURI added in v0.6.0

func (wr *Writer) WriterURI(ctx context.Context, path string) string

WriterURI returns the value of 'path'

Jump to

Keyboard shortcuts

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