gostyle

package module
v0.0.0-...-f1aec6c Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

README

gostyle

an easy to use source code formatter library

Documentation

Index

Constants

View Source
const (
	GO     = "go"
	JAVA   = "java"
	CPP    = "cpp"
	PYTHON = "python"
)

Variables

This section is empty.

Functions

func FormatSource

func FormatSource(source, lang string) error

FormatSource 原地格式化代码

func FormatSourceDir

func FormatSourceDir(dir, lang string) error

FormatSourceDir 原地格式化go代码目录

func GoFormat

func GoFormat(fpath string) error

GoFormat 原地格式化go代码

func Register

func Register(lang string, formatter Formatter)

Register 为语言lang注册对应的格式化方法

Types

type Formatter

type Formatter func(source string) error

Jump to

Keyboard shortcuts

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