util

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package util implements some utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContextDir

func GetContextDir(file string) (string, error)

func Render

func Render(chunks []diff.Chunk) string

Render renders the slice of chunks into a representation that prefixes the lines with '+', '-', or ' ' depending on whether the line was added, removed, or equal (respectively).

func WriteTempFile

func WriteTempFile(data []byte) (string, error)

Types

type Config

type Config struct {
	ContextDir string
}

Config contains configuration for given workspace

func GetConfig

func GetConfig(file string) (*Config, error)

GetConfig tries to find workspace configuration

Jump to

Keyboard shortcuts

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