Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8626455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:02:18+00:00 2026-06-12T08:02:18+00:00

I am trying to code up the wiki for go programing language. I have

  • 0

I am trying to code up the wiki for go programing language.
I have put the data in /data folder and .html files in the /tmpl folder.

I have coded up the main function as follows

func main() {
    walk := func(path string, info os.FileInfo, err error) error {
        if err == nil && !info.IsDir() && filepath.Ext(path) == ".html" {
            http.HandleFunc("/view/", makeHandler(viewHandler))
            http.HandleFunc("/edit/", makeHandler(editHandler))
            http.HandleFunc("/save/", makeHandler(saveHandler))
        }
        return err
    }
    root := TEMPLATE_PATH + "edit.html"
    err := filepath.Walk(root, walk)
    if err != nil {
        return
    }
}

I am getting panic edit.html not found. Could anyone please guide me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:02:19+00:00Added an answer on June 12, 2026 at 8:02 am

    From the documentation of filepath.Walk you can read:

    func Walk(root string, walkFn WalkFunc) error

    Walk walks the file tree rooted at root, calling walkFn for each file or directory in the
    tree, including root. All errors that arise visiting files and directories are filtered by
    walkFn. The files are walked in lexical order, which makes the output deterministic but
    means that for very large directories Walk can be inefficient.

    So Walk expects a directory as first parameter. You’re putting a file in there, which
    makes the whole thing throw a panic.

    I’m not sure what you’re attempting to do, but if you want to open that file, use os.Open or os.Stat if you want to test for existance.

    A general tip when coding in go: Use the gofmt command to format your code according to the style guidelines.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://code.google.com/p/lokad-cloud/wiki/Serialization I have been trying to swap the default serialization in Lokad.Cloud. I have
I am trying to run the code here -- http://code.google.com/p/android-market-api/wiki/HowDownloadApps --, and have this
I can code in Java, and I'm trying to understand the wiki article on
I´m trying to code a tooltip (Yes I know, I have my reasons to
I was just trying to convert a PPT using the following URL http://code.google.com/p/qifei/wiki/PDFConverter python
I am trying to solve the following recurence program. http://en.wikipedia.org/wiki/Hyper_operator Here is my code.
I am trying to use the jQuery CSV plugin, as documented here: http://code.google.com/p/js-tables/wiki/CSV According
I'm trying to utilize ZeroClipboard (http://code.google.com/p/zeroclipboard/wiki/Instructions) to copy the current URL to the user's
so I'm trying to use this plugin: http://code.google.com/p/zeroclipboard/wiki/Instructions which basically allows you to set
I am trying to use the gtm-oauth kit (http://code.google.com/p/gtm-oauth/wiki/GTMOAuthIntroduction) for OAuth2. As instructed by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.