uris

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 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

This section is empty.

Variables

This section is empty.

Functions

func ExpandURIsWithCallback

func ExpandURIsWithCallback(ctx context.Context, cb ExpandURICallbackFunc, uris ...string) error

ExpandURIsWithCallback is a wrapper function for processing one or more URIs and invoking 'cb' for each in the order that the URI was processed. Currently supported URI "expansions" are:

  • If a URI is a bare number (Who's On First ID) it is resolved to its relative path. That path is then prepended with a root "data" folder. Basically it's a short-hand for resolving a specific WOF ID to it's path inside a WOF repo.
  • If a URI starts with 'repo://' it is assumed to be a whosonfirst/go-whosonfirst-iterate/v2 URI and will be used to create an interator to which every file it encounters will be processed with 'cb'

Types

type ExpandURICallbackFunc

type ExpandURICallbackFunc func(context.Context, string) error

ExpandURICallbackFunc is a callback function to invoked for each path (URI) resolved by ExpandURIsWithCallback

Jump to

Keyboard shortcuts

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