Permalink
Browse files

Initial commit

  • Loading branch information...
jstemmer committed Mar 23, 2012
0 parents commit c53aa3472650358213a5fceffd5179201daab5cc
Showing with 57 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +20 −0 LICENSE
  3. +11 −0 README.md
  4. +25 −0 main.go
@@ -0,0 +1 @@
+gotags
20 LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2012 Joel Stemmer
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,11 @@
+go-tags
+===============
+
+Go tags generator
+
+Installation
+------------
+
+ go get github.com/jstemmer/go-tags
+
+ go install github.com/jstemmer/go-tags
25 main.go
@@ -0,0 +1,25 @@
+package main
+
+import (
+ "fmt"
+ "go/ast"
+ "go/parser"
+ "go/token"
+ "os"
+)
+
+func main() {
+ if len(os.Args) != 2 {
+ // TODO: print usage
+ os.Exit(1)
+ }
+
+ fset := token.NewFileSet()
+ f, err := parser.ParseFile(fset, os.Args[1], nil, 0)
+ if err != nil {
+ fmt.Println(err)
+ os.Exit(1)
+ }
+
+ ast.Print(fset, f)
+}

0 comments on commit c53aa34

Please sign in to comment.