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