extract

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package extract retrieves entry content from command arguments, files, or stdin for the add command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Content

func Content(args []string, flags entity.AddConfig) (string, error)

Content retrieves content from various sources for adding entries.

Content is extracted in priority order:

  1. From the file specified by --file flag
  2. From command line arguments (after the entry type)
  3. From stdin (if piped)

Parameters:

  • args: Command arguments where args[1:] may contain inline content
  • flags: Configuration flags including FromFile path

Returns:

  • string: Extracted and trimmed content
  • error: Non-nil if no content source is available or reading fails

Types

This section is empty.

Jump to

Keyboard shortcuts

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