Exemplo n.º 1
0
// Retrieve a specific version of a *file* based node
// The version tag must be in the filenodes AlternateRoutes, you can get the tag
// names from a stat call
func verGetFunc(w http.ResponseWriter, r *http.Request, filesys *fs.RootFileSystem) {
	arr, err := filesys.ReadFileTag(r.URL.Path, r.Form["tag"][0])
	if err == nil {
		fmt.Fprintf(w, "%v", string(arr))
	} else {
		writeError(w, err)
	}
}