Return error on failure
This commit is contained in:
parent
032f2126ed
commit
23396e0880
|
@ -6,10 +6,11 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func Format(source string) interface{} {
|
func Format(source string) interface{} {
|
||||||
if ret, err := format.Source([]byte(source)); err == nil {
|
ret, err := format.Source([]byte(source))
|
||||||
return string(ret)
|
if err != nil {
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
return false
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user