Esempio n. 1
0
File: help.cs Progetto: zjmit/go2cs
 // Help implements the 'help' command.
 public static void Help(io.Writer w, slice <@string> args)
 {
     // 'go help documentation' generates doc.go.
     if (len(args) == 1L && args[0L] == "documentation")
     {
         fmt.Fprintln(w, "// Copyright 2011 The Go Authors. All rights reserved.");
         fmt.Fprintln(w, "// Use of this source code is governed by a BSD-style");
         fmt.Fprintln(w, "// license that can be found in the LICENSE file.");
         fmt.Fprintln(w);
         fmt.Fprintln(w, "// Code generated by mkalldocs.sh; DO NOT EDIT.");
         fmt.Fprintln(w, "// Edit the documentation in other files and rerun mkalldocs.sh to generate this one.");
         fmt.Fprintln(w);
         ptr <object> buf = @new <bytes.Buffer>();
         PrintUsage(buf, [email protected]);
         ptr <base.Command> usage = addr(new base.Command(Long: buf.String()));
         ptr <base.Command> cmds  = new slice <ptr <base.Command> >(new ptr <base.Command>[] { usage });