Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CmdWatStrip = &cli.Command{ Hidden: true, Name: "wat-strip", Usage: "remove unused func and global in WebAssembly text file", ArgsUsage: "<file.wat>", Action: func(c *cli.Context) error { if c.NArg() == 0 { fmt.Fprintf(os.Stderr, "no input file") os.Exit(1) } infile := c.Args().First() source, err := os.ReadFile(infile) if err != nil { fmt.Println(err) os.Exit(1) } watBytes, err := watutil.WatStrip(infile, source) if err != nil { fmt.Println(err) os.Exit(1) } os.Stdout.Write(watBytes) return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.