~john-koepi/ubuntu/trusty/golang/default

« back to all changes in this revision

Viewing changes to src/cmd/godoc/main.go

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-08-03 17:04:59 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110803170459-wzd99m3567y80ila
Tags: 1:59-1
* Imported Upstream version 59
* Refresh patches to a new release
* Fix FTBFS on ARM (Closes: #634270)
* Update version.bash to work with Debian packaging and not hg
  repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
        "flag"
32
32
        "fmt"
33
33
        "go/ast"
 
34
        "go/build"
34
35
        "http"
35
36
        _ "http/pprof" // to serve /debug/pprof/*
36
37
        "io"
222
223
        flag.Usage = usage
223
224
        flag.Parse()
224
225
 
 
226
        // Determine file system to use.
 
227
        // TODO(gri) Complete this - for now we only have one.
 
228
        fs = OS
 
229
 
225
230
        // Clean goroot: normalize path separator.
226
231
        *goroot = filepath.Clean(*goroot)
227
232
 
328
333
        }
329
334
        relpath := path
330
335
        abspath := path
331
 
        if !filepath.IsAbs(path) {
 
336
        if t, pkg, err := build.FindTree(path); err == nil {
 
337
                relpath = pkg
 
338
                abspath = filepath.Join(t.SrcDir(), pkg)
 
339
        } else if !filepath.IsAbs(path) {
332
340
                abspath = absolutePath(path, pkgHandler.fsRoot)
333
341
        } else {
334
342
                relpath = relativeURL(path)