| 1 | package mainscip-go gomod github.com/traefik/yaegi . `github.com/traefik/yaegi/cmd/yaegi`/ |
| 2 | |
| 3 | import "fmtscip-go gomod github.com/golang/go/src go1.21 fmt/" |
| 4 | |
| 5 | const usagescip-go gomod github.com/traefik/yaegi . `github.com/traefik/yaegi/cmd/yaegi`/usage. = `Yaegi is a Go interpreter. |
| 6 | |
| 7 | Usage: |
| 8 | |
| 9 | yaegi [command] [arguments] |
| 10 | |
| 11 | The commands are: |
| 12 | |
| 13 | extract generate a wrapper file from a source package |
| 14 | help print usage information |
| 15 | run execute a Go program from source |
| 16 | test execute test functions in a Go package |
| 17 | version print version |
| 18 | |
| 19 | Use "yaegi help <command>" for more information about a command. |
| 20 | |
| 21 | If no command is given or if the first argument is not a command, then |
| 22 | the run command is assumed. |
| 23 | ` |
| 24 | |
| 25 | func helpscip-go gomod github.com/traefik/yaegi . `github.com/traefik/yaegi/cmd/yaegi`/help().(arg []string) error { |
| 26 | var cmd string |
| 27 | if len(arg) > 0 { |
| 28 | cmd = arg[0] |
| 29 | } |
| 30 | |
| 31 | switch cmd { |
| 32 | case Extractscip-go gomod github.com/traefik/yaegi . `github.com/traefik/yaegi/cmd/yaegi`/Extract.: |
| 33 | return extractCmdscip-go gomod github.com/traefik/yaegi . `github.com/traefik/yaegi/cmd/yaegi`/extractCmd().([]string{"-h"}) |
| 34 | case Helpscip-go gomod github.com/traefik/yaegi . `github.com/traefik/yaegi/cmd/yaegi`/Help., "", "-h", "--help": |
| 35 | fmtscip-go gomod github.com/golang/go/src go1.21 fmt/.Printscip-go gomod github.com/golang/go/src go1.21 fmt/Print().(usagescip-go gomod github.com/traefik/yaegi . `github.com/traefik/yaegi/cmd/yaegi`/usage.) |
| 36 | return nil |
| 37 | case Runscip-go gomod github.com/traefik/yaegi . `github.com/traefik/yaegi/cmd/yaegi`/Run.: |
| 38 | return runscip-go gomod github.com/traefik/yaegi . `github.com/traefik/yaegi/cmd/yaegi`/run().([]string{"-h"}) |
| 39 | case Testscip-go gomod github.com/traefik/yaegi . `github.com/traefik/yaegi/cmd/yaegi`/Test.: |
| 40 | return testscip-go gomod github.com/traefik/yaegi . `github.com/traefik/yaegi/cmd/yaegi`/test().([]string{"-h"}) |
| 41 | case Versionscip-go gomod github.com/traefik/yaegi . `github.com/traefik/yaegi/cmd/yaegi`/Version.: |
| 42 | fmtscip-go gomod github.com/golang/go/src go1.21 fmt/.Printlnscip-go gomod github.com/golang/go/src go1.21 fmt/Println().("Usage: yaegi version") |
| 43 | return nil |
| 44 | default: |
| 45 | return fmtscip-go gomod github.com/golang/go/src go1.21 fmt/.Errorfscip-go gomod github.com/golang/go/src go1.21 fmt/Errorf().("help: invalid yaegi command: %v", cmd) |
| 46 | } |
| 47 | } |