(command.CommandList
  children: [
    (C {<set>} {<-e>})
    (command.ShFunction
      name: usage
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {<echo>} {(DQ <'Usage: -o file'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<Id.Lit_Equals '='>} {<0>} 
          {<Id.Lit_RBracket ']'>}
        )
        (C {<usage>})
      ]
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-gt>} {<1>} {<Id.Lit_RBracket ']'>})
          ]
        )
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'flag='> name:flag)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 1))}
                  spids: [70]
                )
              ]
              redirects: []
            )
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName flag))}
              arms: [
                (case_arm
                  pat_list: [{<-o>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'out='> name:out)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_Number 2))}
                          spids: [89]
                        )
                      ]
                      redirects: []
                    )
                    (C {<mkdir>} {<-p>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_DollarParen '$('>
                            child: (C {<dirname>} {($ Id.VSub_Number 2)})
                            right: <Id.Eof_RParen _>
                          )
                        )
                      }
                    )
                    (C {<shift>})
                  ]
                  spids: [85 86 111 -1]
                )
                (case_arm
                  pat_list: [{<--package>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'package='> name:package)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_Number 2))}
                          spids: [118]
                        )
                      ]
                      redirects: []
                    )
                    (C {<shift>})
                  ]
                  spids: [114 115 127 -1]
                )
                (case_arm
                  pat_list: [{<--ldflags>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ldflags='> name:ldflags)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_Number 2))}
                          spids: [134]
                        )
                      ]
                      redirects: []
                    )
                    (C {<shift>})
                  ]
                  spids: [130 131 143 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (C {<echo>} {(DQ <'Unknown option '> ($ Id.VSub_Number 1))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [146 147 -1 163]
                )
              ]
              redirects: []
            )
            (C {<shift>})
          ]
        )
      redirects: []
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-gt>} {<0>} {<Id.Lit_RBracket ']'>})
        (C {<usage>})
      ]
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName out))} {<Id.Lit_RBracket ']'>})
        (C {<usage>})
      ]
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName package))} {<Id.Lit_RBracket ']'>})
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'package='> name:package)
              op: assign_op.Equal
              rhs: 
                {
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    child: (C {<basename>} {(DQ ($ Id.VSub_DollarName out))})
                    right: <Id.Eof_RParen _>
                  )
                }
              spids: [212]
            )
          ]
          redirects: []
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dir='> name:dir)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName GOPATH) <'/src/'> ($ Id.VSub_DollarName package))}
          spids: [222]
        )
      ]
      redirects: []
    )
    (C {<mkdir>} {<-p>} {($ Id.VSub_DollarName dir)})
    (C {<tar>} {<xf>} {<->} {<-C>} {($ Id.VSub_DollarName dir)})
    (C {<cd>} {($ Id.VSub_DollarName dir)})
    (command.Simple
      words: [{<echo>} {(DQ <gofmt...>)}]
      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
      more_env: []
      do_fork: T
    )
    (C {<test>} {<-z>} 
      {
        (command_sub
          left_token: <Id.Left_DollarParen '$('>
          child: 
            (command.Pipeline
              children: [
                (C {<gofmt>} {<-s>} {<-l>} {<.>})
                (C {<grep>} {<-v>} {<.pb.>})
                (C {<grep>} {<-v>} {<'vendor/'>})
                (C {<tee>} {<'/dev/stderr'>})
              ]
              negated: F
              stderr_indices: []
            )
          right: <Id.Eof_RParen _>
        )
      }
    )
    (command.Simple
      words: [{<echo>} {(DQ <govet...>)}]
      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
      more_env: []
      do_fork: T
    )
    (C {<test>} {<-z>} 
      {
        (command_sub
          left_token: <Id.Left_DollarParen '$('>
          child: 
            (command.Pipeline
              children: [
                (command.Simple
                  words: [{<go>} {<tool>} {<vet>} {<-printf> <Id.Lit_Equals '='> <false>} {<.>}]
                  redirects: [(redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})]
                  more_env: [(env_pair name:GOOS val:{<linux>} spids:[318])]
                  do_fork: T
                )
                (C {<grep>} {<-v>} {<'vendor/'>})
                (C {<tee>} {<'/dev/stderr'>})
              ]
              negated: F
              stderr_indices: []
            )
          right: <Id.Eof_RParen _>
        )
      }
    )
    (command.Simple
      words: [{<echo>} {(DQ <golint...>)}]
      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
      more_env: []
      do_fork: T
    )
    (C {<test>} {<-z>} 
      {
        (command_sub
          left_token: <Id.Left_DollarParen '$('>
          child: 
            (command.Pipeline
              children: [
                (C {<find>} {<.>} {<-type>} {<f>} {<-name>} {(DQ <'*.go'>)} {<-not>} {<-path>} 
                  {(DQ <'*/vendor/*'>)} {<-not>} {<-name>} {(DQ <'*.pb.*'>)} {<-exec>} {<golint>} {<Id.Lit_LBrace '{'> <Id.Lit_RBrace '}'>} 
                  {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\;'> ch:';')}
                )
                (C {<tee>} {<'/dev/stderr'>})
              ]
              negated: F
              stderr_indices: []
            )
          right: <Id.Eof_RParen _>
        )
      }
    )
    (command.Simple
      words: [{<echo>} {(DQ <ineffassign...>)}]
      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
      more_env: []
      do_fork: T
    )
    (C {<test>} {<-z>} 
      {
        (command_sub
          left_token: <Id.Left_DollarParen '$('>
          child: 
            (command.Pipeline
              children: [
                (C {<find>} {<.>} {<-type>} {<f>} {<-name>} {(DQ <'*.go'>)} {<-not>} {<-path>} 
                  {(DQ <'*/vendor/*'>)} {<-not>} {<-name>} {(DQ <'*.pb.*'>)} {<-exec>} {<ineffassign>} {<Id.Lit_LBrace '{'> <Id.Lit_RBrace '}'>} 
                  {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\;'> ch:';')}
                )
                (C {<tee>} {<'/dev/stderr'>})
              ]
              negated: F
              stderr_indices: []
            )
          right: <Id.Eof_RParen _>
        )
      }
    )
    (command.Simple
      words: [{<echo>} {(DQ <'go build...'>)}]
      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
      more_env: []
      do_fork: T
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName GOOS))} {<Id.Lit_Equals '='>} 
                  {(DQ <darwin>)} {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName ldflags))} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (C {<go>} {<build>} {<-o>} {($ Id.VSub_DollarName out)} 
                      {(DQ ($ Id.VSub_DollarName package))}
                    )
                  ]
                  spids: [503 516]
                )
              ]
              else_action: [
                (C {<go>} {<build>} {<-o>} {($ Id.VSub_DollarName out)} {<-ldflags>} 
                  {(DQ (${ Id.VSub_Name ldflags))} {(DQ ($ Id.VSub_DollarName package))}
                )
              ]
              redirects: []
            )
          ]
          spids: [484 500]
        )
      ]
      else_action: [
        (C {<go>} {<build>} {<-o>} {($ Id.VSub_DollarName out)} {<-buildmode>} {<pie>} {<-ldflags>} 
          {
            (DQ <'-s -w '> (${ Id.VSub_Name ldflags) <' -extldflags '> 
              (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <-static> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"')
            )
          } {(DQ ($ Id.VSub_DollarName package))}
        )
      ]
      redirects: []
    )
    (C {<tar>} {<cf>} {<->} {($ Id.VSub_DollarName out)})
  ]
)