소스 검색

Align code example documentation (#52)

Uwe Dauernheim 10 년 전
부모
커밋
01fa4104b9
1개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  1. 7 7
      errors.go

+ 7 - 7
errors.go

@@ -2,9 +2,9 @@
 //
 // The traditional error handling idiom in Go is roughly akin to
 //
-//      if err != nil {
-//              return err
-//      }
+//     if err != nil {
+//             return err
+//     }
 //
 // which applied recursively up the call stack results in error reports
 // without context or debugging information. The errors package allows
@@ -16,10 +16,10 @@
 // The errors.Wrap function returns a new error that adds context to the
 // original error. For example
 //
-//      _, err := ioutil.ReadAll(r)
-//      if err != nil {
-//              return errors.Wrap(err, "read failed")
-//      }
+//     _, err := ioutil.ReadAll(r)
+//     if err != nil {
+//             return errors.Wrap(err, "read failed")
+//     }
 //
 // Retrieving the cause of an error
 //