Create a page
From Hobby'dev
New pages[edit | edit source]
It's really easy to create a new page. You have two options.
- From an existing page
- Edit an existing page
- add a link to your future page
- click on the link you just created
- From scratch
- Type the name of your future page in the search box
- click the "Create the page <name> on this wiki!" link
Once you're done, go to the complete list of projects page, and add your project in the alphabetical list.
That's it!
Source code[edit | edit source]
At some point, you'll want to publish snippets. There's a tag for it. If you type this:
<source lang="go"> package main import ( "bufio" "fmt" "log" "os" "github.com/eduardonunesp/goaiml" ) func main() { aiml := goaiml.NewAIML() err := aiml.Learn("../test.aiml.xml") if err != nil { log.Fatal(err) } scanner := bufio.NewScanner(os.Stdin) fmt.Print("You: ") for scanner.Scan() { line := scanner.Text() resp, _ := aiml.Respond(line) fmt.Println("Robot: " + resp) fmt.Print("You: ") } } </source>
You'll get this:
package main
import (
"bufio"
"fmt"
"log"
"os"
"github.com/eduardonunesp/goaiml"
)
func main() {
aiml := goaiml.NewAIML()
err := aiml.Learn("../test.aiml.xml")
if err != nil {
log.Fatal(err)
}
scanner := bufio.NewScanner(os.Stdin)
fmt.Print("You: ")
for scanner.Scan() {
line := scanner.Text()
resp, _ := aiml.Respond(line)
fmt.Println("Robot: " + resp)
fmt.Print("You: ")
}
}
Pretty cool. Thank you ShoutWiki!