conv

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2016 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package conv provides some conversion and reading functions used across multiple commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToString

func BytesToString(data []byte, lnbr int) string

BytesToString converts a byte slice into an equivalent string. Via the lnbr parameter you can set when to break lines. If lnbr is larger than 0 a new line is added every lnbr bytes.

func FileOrStdin

func FileOrStdin(arg string) (data []byte, err error)

FileOrStdin reads data from a file with the name arg, or from stdin if arg == "-".

func TextOrStdin

func TextOrStdin(arg string) (string, error)

TextOrStdin returns arg, or from reads from stdin if arg == "-".

func TextToByteSlice

func TextToByteSlice(text string) ([]byte, error)

TextToByteSlice converts a string in form of gocode into an equivalent byte slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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