Skip to content

Commit

Permalink
Basic golang "Hello World" with waf script.
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfe committed Mar 18, 2011
1 parent ca2518b commit 8b70334
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 3 deletions.
11 changes: 11 additions & 0 deletions go/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Installing Go

http://golang.org

$ sudo port install go

Installing waf

$ curl -O http://waf.googlecode.com/files/waf-1.6.3
$ mv waf-1.6.3 waf
$ ./waf --version
7 changes: 7 additions & 0 deletions go/hello.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "fmt"

func main() {
fmt.Printf("hello, world\n");
}
Binary file added go/waf
Binary file not shown.
18 changes: 18 additions & 0 deletions go/wscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
APPNAME = "gohello"
VERSION = "1.0"

top = "."
out = "build"

def configure(ctx):
pass

def hello(ctx):
print("hello world")

def build(ctx):
go_compile = "6g ${SRC} -o ${TGT}"
go_link = "6l ${SRC} -o ${TGT}"

ctx(rule=go_compile, source="hello.go", target="hello.6")
ctx(rule=go_link, source="hello.6", target="hello")
9 changes: 6 additions & 3 deletions scala/MapTest.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package com.muthanna.playground.scala

import java.lang.Integer;
import java.util.Map;
import java.util.HashMap;

object MapTest {
def main(args: Array[String]) {
var capital = Map("US" -> "DC", "India" -> "Delhi")
capital += ("Canada" -> "Ottawa")
println(capital("India"))
var aMap = new HashMap[Integer, String]
println("boo");
}
}

0 comments on commit 8b70334

Please sign in to comment.