Return error on failure

This commit is contained in:
Ketchetwahmeegwun T. Southall 2022-03-02 01:15:16 -08:00
parent 032f2126ed
commit 23396e0880

View File

@ -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() {