(CommandList
  children: [
    (C {(set)} {(-e)})
    (FuncDef
      name: usage
      body: 
        (BraceGroup
          children: [(C {(echo)} {(DQ ("Usage: -o file"))}) (C {(exit)} {(1)})]
          spids: [23]
        )
      spids: [19 22]
    )
    (AndOr
      children: [
        (C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(Lit_Other "=")} {(0)} {(Lit_Other "]")})
        (C {(usage)})
      ]
      op_id: Op_DAmp
    )
    (While
      cond: [(C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-gt)} {(1)} {(Lit_Other "]")})]
      body: 
        (DoGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:flag)
                  op: Equal
                  rhs: {(DQ ($ VSub_Number "$1"))}
                  spids: [70]
                )
              ]
              spids: [70]
            )
            (Case
              to_match: {(DQ ($ VSub_Name "$flag"))}
              arms: [
                (case_arm
                  pat_list: [{(-o)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:out)
                          op: Equal
                          rhs: {(DQ ($ VSub_Number "$2"))}
                          spids: [89]
                        )
                      ]
                      spids: [89]
                    )
                    (C {(mkdir)} {(-p)} 
                      {
                        (DQ 
                          (CommandSubPart
                            command_list: 
                              (CommandList
                                children: [(C {(dirname)} {($ VSub_Number "$2")})]
                              )
                            left_token: <Left_CommandSub "$(">
                            spids: [100 104]
                          )
                        )
                      }
                    )
                    (C {(shift)})
                  ]
                  spids: [85 86 111 -1]
                )
                (case_arm
                  pat_list: [{(--package)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:package)
                          op: Equal
                          rhs: {(DQ ($ VSub_Number "$2"))}
                          spids: [118]
                        )
                      ]
                      spids: [118]
                    )
                    (C {(shift)})
                  ]
                  spids: [114 115 127 -1]
                )
                (case_arm
                  pat_list: [{(--ldflags)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:ldflags)
                          op: Equal
                          rhs: {(DQ ($ VSub_Number "$2"))}
                          spids: [134]
                        )
                      ]
                      spids: [134]
                    )
                    (C {(shift)})
                  ]
                  spids: [130 131 143 -1]
                )
                (case_arm
                  pat_list: [{(Lit_Other "*")}]
                  action: [
                    (C {(echo)} {(DQ ("Unknown option ") ($ VSub_Number "$1"))})
                    (C {(exit)} {(1)})
                  ]
                  spids: [146 147 -1 163]
                )
              ]
              spids: [76 82 163]
            )
            (C {(shift)})
          ]
          spids: [67 168]
        )
    )
    (AndOr
      children: [
        (C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-gt)} {(0)} {(Lit_Other "]")})
        (C {(usage)})
      ]
      op_id: Op_DAmp
    )
    (AndOr
      children: [
        (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$out"))} {(Lit_Other "]")})
        (C {(usage)})
      ]
      op_id: Op_DAmp
    )
    (AndOr
      children: [
        (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$package"))} {(Lit_Other "]")})
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:package)
              op: Equal
              rhs: 
                {
                  (CommandSubPart
                    command_list: 
                      (CommandList
                        children: [(C {(basename)} {(DQ ($ VSub_Name "$out"))})]
                      )
                    left_token: <Left_CommandSub "$(">
                    spids: [213 219]
                  )
                }
              spids: [212]
            )
          ]
          spids: [212]
        )
      ]
      op_id: Op_DAmp
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:dir)
          op: Equal
          rhs: {(DQ ($ VSub_Name "$GOPATH") (/src/) ($ VSub_Name "$package"))}
          spids: [222]
        )
      ]
      spids: [222]
    )
    (C {(mkdir)} {(-p)} {($ VSub_Name "$dir")})
    (C {(tar)} {(xf)} {(-)} {(-C)} {($ VSub_Name "$dir")})
    (C {(cd)} {($ VSub_Name "$dir")})
    (SimpleCommand
      words: [{(echo)} {(DQ (gofmt...))}]
      redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[259])]
    )
    (C {(test)} {(-z)} 
      {
        (CommandSubPart
          command_list: 
            (CommandList
              children: [
                (Pipeline
                  children: [
                    (C {(gofmt)} {(-s)} {(-l)} {(.)})
                    (C {(grep)} {(-v)} {(.pb.)})
                    (C {(grep)} {(-v)} {(vendor/)})
                    (C {(tee)} {(/dev/stderr)})
                  ]
                  negated: False
                )
              ]
            )
          left_token: <Left_CommandSub "$(">
          spids: [272 301]
        )
      }
    )
    (SimpleCommand
      words: [{(echo)} {(DQ (govet...))}]
      redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[304])]
    )
    (C {(test)} {(-z)} 
      {
        (CommandSubPart
          command_list: 
            (CommandList
              children: [
                (Pipeline
                  children: [
                    (SimpleCommand
                      words: [{(go)} {(tool)} {(vet)} {(-printf) (Lit_Other "=") (false)} {(.)}]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[333])]
                      more_env: [(env_pair name:GOOS val:{(linux)} spids:[318])]
                    )
                    (C {(grep)} {(-v)} {(vendor/)})
                    (C {(tee)} {(/dev/stderr)})
                  ]
                  negated: False
                )
              ]
            )
          left_token: <Left_CommandSub "$(">
          spids: [317 349]
        )
      }
    )
    (SimpleCommand
      words: [{(echo)} {(DQ (golint...))}]
      redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[352])]
    )
    (C {(test)} {(-z)} 
      {
        (CommandSubPart
          command_list: 
            (CommandList
              children: [
                (Pipeline
                  children: [
                    (C {(find)} {(.)} {(-type)} {(f)} {(-name)} {(DQ ("*.go"))} {(-not)} {(-path)} 
                      {(DQ ("*/vendor/*"))} {(-not)} {(-name)} {(DQ ("*.pb.*"))} {(-exec)} {(golint)} {(Lit_LBrace "{") (Lit_RBrace "}")} 
                      {(EscapedLiteralPart token:<Lit_EscapedChar "\\;">)}
                    )
                    (C {(tee)} {(/dev/stderr)})
                  ]
                  negated: False
                )
              ]
            )
          left_token: <Left_CommandSub "$(">
          spids: [365 410]
        )
      }
    )
    (SimpleCommand
      words: [{(echo)} {(DQ (ineffassign...))}]
      redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[413])]
    )
    (C {(test)} {(-z)} 
      {
        (CommandSubPart
          command_list: 
            (CommandList
              children: [
                (Pipeline
                  children: [
                    (C {(find)} {(.)} {(-type)} {(f)} {(-name)} {(DQ ("*.go"))} {(-not)} {(-path)} 
                      {(DQ ("*/vendor/*"))} {(-not)} {(-name)} {(DQ ("*.pb.*"))} {(-exec)} {(ineffassign)} {(Lit_LBrace "{") (Lit_RBrace "}")} 
                      {(EscapedLiteralPart token:<Lit_EscapedChar "\\;">)}
                    )
                    (C {(tee)} {(/dev/stderr)})
                  ]
                  negated: False
                )
              ]
            )
          left_token: <Left_CommandSub "$(">
          spids: [426 471]
        )
      }
    )
    (SimpleCommand
      words: [{(echo)} {(DQ ("go build..."))}]
      redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[474])]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$GOOS"))} {(Lit_Other "=")} {(DQ (darwin))} 
              {(Lit_Other "]")}
            )
          ]
          action: [
            (If
              arms: [
                (if_arm
                  cond: [(C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$ldflags"))} {(Lit_Other "]")})]
                  action: [
                    (C {(go)} {(build)} {(-o)} {($ VSub_Name "$out")} {(DQ ($ VSub_Name "$package"))})
                  ]
                  spids: [-1 516]
                )
              ]
              else_action: [
                (C {(go)} {(build)} {(-o)} {($ VSub_Name "$out")} {(-ldflags)} {(DQ (${ VSub_Name ldflags))} 
                  {(DQ ($ VSub_Name "$package"))}
                )
              ]
              spids: [532 556]
            )
          ]
          spids: [-1 500]
        )
      ]
      else_action: [
        (C {(go)} {(build)} {(-o)} {($ VSub_Name "$out")} {(-buildmode)} {(pie)} {(-ldflags)} 
          {
            (DQ ("-s -w ") (${ VSub_Name ldflags) (" -extldflags ") 
              (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) (-static) (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">)
            )
          } {(DQ ($ VSub_Name "$package"))}
        )
      ]
      spids: [558 590]
    )
    (C {(tar)} {(cf)} {(-)} {($ VSub_Name "$out")})
  ]
)