/helloworld/helloworld/helloworld.go

http://asist-world.googlecode.com/ · Go · 19 lines · 12 code · 4 blank · 3 comment · 0 complexity · 17fc2a9095ba1a22f231f29a7d548d09 MD5 · raw file

  1. // Copyright 2011 Google Inc. All rights reserved.
  2. // Use of this source code is governed by the Apache 2.0
  3. // license that can be found in the LICENSE file.
  4. package counter
  5. import (
  6. "fmt"
  7. "http"
  8. )
  9. func init() {
  10. http.HandleFunc("/", handle)
  11. }
  12. func handle(w http.ResponseWriter, r *http.Request) {
  13. w.Header().Set("Content-Type", "text/plain; charset=utf-8")
  14. fmt.Fprint(w, "Hello, World! 세상아 안녕!\n")
  15. }