writers

package
v0.0.0-...-bcdf8a7 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package writers handles the file write operations

Index

Constants

This section is empty.

Variables

View Source
var NewLinesRegex = regexp.MustCompile(`(?m:\s*$)`)

NewLinesRegex holds the regex to remove newlines from given bytes.Buffer

Functions

func Clear

func Clear(buf bytes.Buffer) ([]byte, error)

Clear formats the given source with predefined operations, it removes the new lines too

func Write

func Write(fileName string, models []byte) error

func WriteFormattedFile

func WriteFormattedFile(fileName string, model []byte) error

WriteFormattedFile formats the code with goimports and writes the result to the given file, if file doesnt exists, it creates it

Types

This section is empty.

Jump to

Keyboard shortcuts

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