code stringlengths 10 1.34M | language stringclasses 1
value |
|---|---|
// Copyright 2011 Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package googleapi contains the common code shared by all Google API
// libraries.
package googleapi
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"... | Go |
// Copyright 2012 Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package transport contains HTTP transports used to make
// authenticated API requests.
package transport
import (
"errors"
"net/http"
)
// APIKey is an HTTP ... | Go |
// Package adsensehost provides access to the AdSense Host API.
//
// See https://developers.google.com/adsense/host/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/adsensehost/v4.1"
// ...
// adsensehostService, err := adsensehost.New(oauthHttpClient)
package adsensehost
import (
"by... | Go |
// Package groupsmigration provides access to the Groups Migration API.
//
// See https://developers.google.com/google-apps/groups-migration/
//
// Usage example:
//
// import "code.google.com/p/google-api-go-client/groupsmigration/v1"
// ...
// groupsmigrationService, err := groupsmigration.New(oauthHttpClient)
... | Go |
// Package issues impliments logging.
package issues
import (
"bytes"
"log"
"os"
"path"
"code.google.com/awwwe-browser/data"
)
var logbuffer bytes.Buffer
var logpath string
var Logger *log.Logger
func init() {
// setup the awwwelogger
var cwd string
var err error
cwd, err = os.Getwd()
if err == nil {
lo... | Go |
package vois
import (
"encoding/xml"
"fmt"
"strings"
"code.google.com/awwwe-browser/data"
)
// Parse <navigation>...</navigation> tags in an rss feed.
func processRSSNavigation(dec *xml.Decoder, e xml.StartElement) (*VOISContent, error) {
var vc *VOISContent
var err error
vc = newVOISContent()
vc.ContentType... | Go |
// Package vois impliments vois markup files.
package vois
import (
"bytes"
"encoding/xml"
"fmt"
"io"
)
// UnMarshal a vois.xml file into a *VOISData
func UnMarshal(vois []byte) (*VOISData, error) {
var rdr *bytes.Reader
var dec *xml.Decoder
var token xml.Token
var err error
var vd *VOISData
var se xml.Star... | Go |
package vois
import (
"encoding/xml"
"fmt"
"code.google.com/awwwe-browser/data"
)
// Parse <form>...</form> tags.
func processForm(dec *xml.Decoder, e xml.StartElement) (*VOISContent, error) {
var vc *VOISContent
var err error
vc = newVOISContent()
vc.ContentType = FormContentType
err = _processForm(dec, vc)... | Go |
package vois
import (
"encoding/xml"
"fmt"
"strings"
"code.google.com/awwwe-browser/data"
)
// Parse <navigation>...</navigation> tagss in an atom feed.
func processAtomNavigation(dec *xml.Decoder, e xml.StartElement) (*VOISContent, error) {
var vc *VOISContent
var err error
vc = newVOISContent()
vc.ContentT... | Go |
package vois
import (
"encoding/xml"
"fmt"
"strings"
"code.google.com/awwwe-browser/data"
)
// Parse <navigation>...</navigation> tags.
func processNavigation(dec *xml.Decoder, e xml.StartElement) (*VOISContent, error) {
var vc *VOISContent
var err error
vc = newVOISContent()
vc.ContentType = NavigationConte... | Go |
package vois
import (
"encoding/xml"
"fmt"
"strings"
"code.google.com/awwwe-browser/data"
)
// Parse <article>...</article> tags.
func processArticle(dec *xml.Decoder, e xml.StartElement) (*VOISContent, error) {
var vc *VOISContent
var err error
vc = newVOISContent()
vc.ContentType = ArticleContentType
vc.O... | Go |
package vois
import (
"bytes"
"encoding/xml"
"fmt"
)
// Parse <sayas-at>...<sayas-at> tags.
func processSayasAt(dec *xml.Decoder, e xml.StartElement) (VOISSayasAt, error) {
var secopy xml.StartElement
var cdcopy xml.CharData
var ee xml.EndElement
var token xml.Token
var err error
var vsa VOISSayasAt
var att... | Go |
package vois
import (
"strings"
"code.google.com/awwwe-browser/data"
)
// data for <sayas-text></sayas-text>
type VOISSayasText struct {
Text string
Sayas string
}
// data for <sayas-at></sayas-at>
type VOISSayasAt struct {
Xpath string
Sayas string
}
// the content on a web page may be of different types.
... | Go |
package data
// a base type.
type SlicerBase struct {
capacity int
Data []interface{}
cmpMethod func(interface{}, interface{}) int
}
// Initializes the structure.
// the param cmpmethod is the compare method.
// This should be called by a constructor of a derived type.
func (this *SlicerBase) Init(length, ca... | Go |
package data
import (
"encoding/json"
)
// a rune slice
type SliceSliceRune struct {
SlicerBase
}
// a cmp method for []runes
func cmpSliceRune(i1 interface{}, i2 interface{}) int {
var i, length int
var r1, r2 rune
var rr1, rr2 []rune
rr1 = i1.([]rune)
rr2 = i2.([]rune)
length = len(rr1)
i = len(rr2)
if l... | Go |
package data
import (
"encoding/json"
)
// a string slice
type SliceString struct {
SlicerBase
}
// a cmp method for strings
func cmpString(i1 interface{}, i2 interface{}) int {
if i1.(string) > i2.(string) {
return 1
} else if i1.(string) < i2.(string) {
return -1
} else {
return 0
}
}
// Builds a stri... | Go |
// This package impliments general data for the entire app.
package data
import (
"bytes"
"strings"
"unicode/utf8"
)
const AWWWEAttributePrefix string = "x-awwwe-browser-"
var (
AWWWEParamActualURL string = AWWWEAttributePrefix + "url"
AWWWE string = "awwwe"
)
var (
AWWWEAttributeTemp strin... | Go |
// Package slurp impliments reading files and resources.
package slurp
import (
"bytes"
"errors"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"os"
"strings"
"time"
"gopkg.in/xmlpath.v2"
"code.google.com/awwwe-browser/data"
"code.google.com/awwwe-browser/scrub"
"code.google.com/awwwe-browser/scrub/htmlsoup"
)
... | Go |
package xpath
import (
"bytes"
"strings"
"gopkg.in/xmlpath.v2"
"code.google.com/awwwe-browser/data"
)
// Converts an xpath path expression to a []*xmlpath.Node.
// path is a valid xpath path expression.
// context is the xmlpath.Node on which to apply the path.
func PathNodesString(path string, context *xmlpath... | Go |
package xpath
import (
"bytes"
"strings"
"gopkg.in/xmlpath.v2"
"code.google.com/awwwe-browser/data"
)
type boolTestType int
const (
_ boolTestType = iota
booleanTestType
logicalTestType
)
type logicalType int
const (
_ logicalType = iota
andLogicalType
orLogicalType
nilLogicalType
)
type booleanTest ... | Go |
package xpath
import (
"bytes"
"strings"
"code.google.com/awwwe-browser/data"
)
// an expression is boolean
// ex: (count(p1) = 1 or p2) and count(p3) = 3
type parsableExpression struct {
expression []rune
index int
}
func newParsableExpression(expression []rune) *parsableExpression {
var v parsableExpre... | Go |
// Package xpath impliments more advanced xpath expressions than "gopkg.in/xmlpath.v2" currently does.
package xpath
import (
"bytes"
"code.google.com/awwwe-browser/data"
)
const (
countStartString string = "count"
existsStartString string = "exists"
)
const (
parenStartRune rune = '('
parenEndRune run... | Go |
// runs as a server on the client
// "/" returns the html view of the awwwe browser
// URLs have the following structure
// "/package/object/method
// "/auralvm/" aural view model package which returns json conversations
package main
import (
"fmt"
"net/http"
"code.google.com/awwwe-browser/auralvm"
"code.google.c... | Go |
// Package mimetyp impliments mime type specific functions.
package mimetype
import (
"mime"
"net/url"
"strings"
"code.google.com/awwwe-browser/data"
)
var htmlMimeType = mime.TypeByExtension(".html")
func AWWWEURL(urlstring string) string {
purl, err := url.Parse(urlstring)
if err == nil {
i := strings.Ind... | Go |
package bookmark
import (
"encoding/json"
"os"
"code.google.com/awwwe-browser/auralvm/param"
"code.google.com/awwwe-browser/data"
"code.google.com/awwwe-browser/slurp"
)
// a bookmark slice
type SliceBookmark struct {
data.SlicerBase
}
// a cmp method for bookmarks
func cmpBookmark(i1 interface{}, i2 interfac... | Go |
// Package bookmark impliments bookmarks in the browser.
package bookmark
import (
"fmt"
"net/http"
"time"
"code.google.com/awwwe-browser/auralvm/conversation"
"code.google.com/awwwe-browser/auralvm/param"
"code.google.com/awwwe-browser/auralvm/setting"
"code.google.com/awwwe-browser/data"
)
// Alternative HT... | Go |
package param
const (
argumentNamePrefix string = "awwweparam_"
)
const (
ParamValue string = "value"
ParamTabKey string = argumentNamePrefix + "tab_key"
ParamTabContentIndex string = argumentNamePrefix + "tab_content_index"
ParamTabContentContentIndex string =... | Go |
package param
import (
"encoding/json"
"code.google.com/awwwe-browser/data"
)
type FormControlType int
const (
FormControlTypeNone FormControlType = iota // return value is bool
FormControlTypeText
FormControlTypeSingleSelect
FormControlTypeMultipleSelect
FormControlTypeSubmit
)
type FormControlText struct ... | Go |
package param
import (
"bytes"
"code.google.com/awwwe-browser/data"
"fmt"
"net/http/cookiejar"
"net/url"
"os"
"path"
)
const (
StartPath string = "/"
)
var (
Scheme string
Host string
Port int
Package string
HomeURL string
BrowserCookieJar *cookiejar.... | Go |
package tab
import (
"code.google.com/awwwe-browser/data"
)
var BrowserTabs SliceTab
func init() {
BrowserTabs = BuildSliceTab(0, 20)
}
// a tab slice
type SliceTab struct {
data.SlicerBase
}
// a cmp method for feeds
func cmpTab(i1 interface{}, i2 interface{}) int {
if i1.(*Tab).Key == i2.(*Tab).Key {
retur... | Go |
package tab
import (
"bytes"
"errors"
"fmt"
"net/url"
"path"
"path/filepath"
"strings"
"gopkg.in/xmlpath.v2"
"code.google.com/awwwe-browser/auralvm/conversation"
"code.google.com/awwwe-browser/auralvm/feed"
"code.google.com/awwwe-browser/auralvm/param"
"code.google.com/awwwe-browser/auralvm/setting"
"co... | Go |
package tab
import (
"fmt"
"net/http"
"net/url"
"strings"
"gopkg.in/xmlpath.v2"
"code.google.com/awwwe-browser/auralvm/conversation"
"code.google.com/awwwe-browser/auralvm/param"
"code.google.com/awwwe-browser/auralvm/setting"
"code.google.com/awwwe-browser/data"
"code.google.com/awwwe-browser/scrub"
"cod... | Go |
package tab
import (
"fmt"
"net/http"
"code.google.com/awwwe-browser/auralvm/conversation"
"code.google.com/awwwe-browser/auralvm/param"
"code.google.com/awwwe-browser/auralvm/setting"
"code.google.com/awwwe-browser/data"
)
// HandlerTabListTools handles an http request to list the tab tools for the view.
func... | Go |
package tab
import (
"fmt"
"strings"
"gopkg.in/xmlpath.v2"
"code.google.com/awwwe-browser/auralvm/conversation"
"code.google.com/awwwe-browser/auralvm/param"
"code.google.com/awwwe-browser/auralvm/setting"
"code.google.com/awwwe-browser/data"
"code.google.com/awwwe-browser/scrub"
"code.google.com/awwwe-brow... | Go |
package tab
import (
"fmt"
"net/http"
"net/url"
"code.google.com/awwwe-browser/auralvm/conversation"
"code.google.com/awwwe-browser/auralvm/param"
"code.google.com/awwwe-browser/data"
)
// Alternative HTTP handler for sending data back to the view.
var NextContinuer func(http.ResponseWriter, *http.Request, str... | Go |
// Package conversation implements data that is sent to the view.
package conversation
import (
"bytes"
"encoding/json"
"fmt"
"gopkg.in/xmlpath.v2"
"code.google.com/awwwe-browser/auralvm/param"
"code.google.com/awwwe-browser/data"
"code.google.com/awwwe-browser/scrub"
"code.google.com/awwwe-browser/scrub/htm... | Go |
package conversation
import (
"fmt"
"strings"
"gopkg.in/xmlpath.v2"
"code.google.com/awwwe-browser/auralvm/param"
"code.google.com/awwwe-browser/data"
"code.google.com/awwwe-browser/scrub"
"code.google.com/awwwe-browser/scrub/htmlsoup"
"code.google.com/awwwe-browser/vois"
"code.google.com/awwwe-browser/xpat... | Go |
package conversation
import (
"fmt"
"gopkg.in/xmlpath.v2"
"code.google.com/awwwe-browser/scrub"
"code.google.com/awwwe-browser/scrub/htmlsoup"
"code.google.com/awwwe-browser/xpath"
)
var videoEmbedXpaths = [...]string{
`.//iframe[contains(@src, "www.break.com/embed/")]`,
`.//iframe[contains(@src. "www.ustrea... | Go |
package auralvm
| Go |
package feed
import (
"encoding/json"
"os"
"code.google.com/awwwe-browser/auralvm/param"
"code.google.com/awwwe-browser/data"
"code.google.com/awwwe-browser/slurp"
)
var feedKeyer int = 0
type Feed struct {
Key int
Host string
SiteName string
URL string
}
func BuildFeed() Feed {
var v Feed
... | Go |
// Package feed impliments the syndication feeds for the browser.
package feed
import (
"fmt"
"net/http"
"net/url"
"path"
"strings"
"time"
"code.google.com/awwwe-browser/auralvm/conversation"
"code.google.com/awwwe-browser/auralvm/param"
"code.google.com/awwwe-browser/auralvm/setting"
"code.google.com/awwwe... | Go |
package feed
import (
"encoding/json"
"os"
"time"
"code.google.com/awwwe-browser/auralvm/param"
"code.google.com/awwwe-browser/data"
"code.google.com/awwwe-browser/slurp"
)
// FeedItem is an article linked to in a feed that the user has or has not read.
// FeedItem.Time is the last time the article was view... | Go |
package setting
import (
"encoding/json"
"fmt"
"net/http"
"os"
"code.google.com/awwwe-browser/auralvm/conversation"
"code.google.com/awwwe-browser/auralvm/param"
"code.google.com/awwwe-browser/data"
"code.google.com/awwwe-browser/slurp"
)
// Alternative HTTP handler for sending data back to the view.
var Nex... | Go |
package voisfile
import (
"errors"
"fmt"
"io"
"net/http"
"net/url"
"os"
"path"
"path/filepath"
"strings"
"code.google.com/awwwe-browser/auralvm/conversation"
"code.google.com/awwwe-browser/auralvm/param"
"code.google.com/awwwe-browser/auralvm/setting"
"code.google.com/awwwe-browser/data"
"code.google.co... | Go |
package auralvm
import (
"fmt"
"html/template"
"net/http"
"net/url"
"code.google.com/awwwe-browser/auralvm/conversation"
"code.google.com/awwwe-browser/auralvm/param"
)
// template data
type StartData struct {
URL template.HTMLAttr
Package template.JS... | Go |
// Package browser implements the browser level jobs and data.
// The browsers allows the user to select the feed, setting, tab and voisfile tools of the browser.
package browser
import (
"net/http"
"code.google.com/awwwe-browser/auralvm/bookmark"
"code.google.com/awwwe-browser/auralvm/conversation"
"code.google.... | Go |
// This package is the view model for the aural browser.
// The Browser has different parts and each part has its own tools.
// Those parts are:
// VOIS Markup files which the user can select individually to open a web site in a new tab.
// Bookmarks which the user can select individually to open a web page in a new ta... | Go |
// Cleans up the bytes already slurped from an html file.
//
// example:
// // slurp up the bytes from an html file somehow.
// ...
// // clean up the dirty html
// var scrubber *Scrubber
// scrubber = scrub.NewScrubber(bytesFromTheHtmlFile, urlOfTheHtmlFile)
// scrubber.Scrub()
// // Then get a node.
// reader... | Go |
package htmlsoup
import (
"code.google.com/awwwe-browser/data"
"net/url"
)
// SoupNode.statics.staticNameSpaces
// parts
type staticNameSpaces struct {
namespaces map[string]string
}
func buildStaticNameSpaces() staticNameSpaces {
var v staticNameSpaces
v.namespaces = make(map[string]string)
return v
}
// n... | Go |
package htmlsoup
import (
"bytes"
"fmt"
"code.google.com/awwwe-browser/data"
)
const (
_ = iota
nodeTypeDocument int = iota
nodeTypeDocType
nodeTypeInstruction
nodeTypeDirective
nodeTypeCdata
nodeTypeComment
nodeTypeConditionalComment
nodeTypeTag
nodeTypeText
)
type SoupNode struct {... | Go |
package htmlsoup
import (
"bytes"
"encoding/hex"
"regexp"
"strings"
"code.google.com/awwwe-browser/data"
)
type entityReferenceDatum struct {
Bytes []byte
HexString string
Speech string
Description string
}
func buildEntityReferenceDatum(hexstring string, speech string, description string) ent... | Go |
package htmlsoup
import (
"bytes"
"fmt"
"strings"
"net/url"
"code.google.com/awwwe-browser/data"
)
// docNode.attributes
type nodeAttribute struct {
prefix, name, value string
}
func newNodeAttribute() *nodeAttribute {
var v nodeAttribute
return &v
}
type nodeAttributeArray struct {
attributes []*nodeAt... | Go |
package htmlsoup
import (
"bytes"
)
type htmlTagMapSetting struct {
validParents, inValidParents, validChildren []string
forcedClosed []string
isBlock, canBeBlock, useEndTag bool
isValid bool
isOutput ... | Go |
package htmlsoup
import (
"bytes"
"fmt"
"strings"
"code.google.com/awwwe-browser/data"
)
const (
titleAttributeName = "title"
altAttributeName = "alt"
alignAttributeName = "align"
alignAttrubuteValueCenter = "center"
alignAttrubuteValueRight = "right"
alignAttrubuteValueLeft = "le... | Go |
package htmlsoup
type SliceSoupNode struct {
capacity int
data []*SoupNode
}
func BuildSliceSoupNode(length, capacity int) SliceSoupNode {
var v SliceSoupNode
if capacity < length {
if length > 0 {
capacity = length
} else {
length = 0
capacity = 20
}
}
v.capacity = capacity
v.data = make([]... | Go |
package htmlsoup
import (
"fmt"
"net/url"
"strings"
"code.google.com/awwwe-browser/data"
)
func newSoupNode() *SoupNode {
var v SoupNode
//v.nodeType = nodeTypeDocument
v.nodeCount = 0
v.id = -1
v.prefix = data.EmptyString
v.name = data.EmptyString
//v.statics.documentNameSpaces = nil
v.nameSpaces = make... | Go |
// copyright stuff
// htmlsoup is nodes for building an html tree.
// the nodes have String() and Byte() methods which return a representation of the node.
//
//
// example:
// dirtytree := htmlsoup.NewDocumentNode()
// // parse first tag evaluating that it is a doctype tag
// // add a doctype node to the tree usin... | Go |
package htmlsoup
import (
"bytes"
"strings"
"code.google.com/awwwe-browser/data"
)
var writeIndent = 0
// Returns clean html as a slice of bytes.
func (this *SoupNode) Bytes() []byte {
bfr := bytes.NewBuffer(data.EmptyBytes)
this.writeHandler(this, bfr)
return bfr.Bytes()
}
// Returns clean html as a string.... | Go |
package main
import (
"fmt"
"net/http"
"code.google.com/awwwe-browser/voisedit/editvois"
)
// autostart:
// C:\Users\user1\My Projects\go\src\code.google.com\p\go-tour\gotour\local.go
func main() {
editvois.SetHostPort("localhost", 9999)
// html templates
http.HandleFunc(fmt.Sprintf("/%s/", editvois.Package),... | Go |
package editvois
import (
"bytes"
"fmt"
"html/template"
"net/http"
"os"
"code.google.com/awwwe-browser/data"
)
// currently not used althought its referenced in main.awwwebrowser.go
// handles the intro page for the how to section.
func HandlerHowToIntro(w http.ResponseWriter, r *http.Request) {
var pdata *Pa... | Go |
package editvois
import (
"fmt"
"html/template"
"net/http"
"net/url"
"os"
"code.google.com/awwwe-browser/data"
)
type NotHomeCSSData struct {
MaxWidth template.CSS
H1Width, H1Size template.CSS
}
// returns the view data.
func newNotHomeCSSData(screenwidth int) *NotHomeCSSData {
var v NotHomeCSSData
... | Go |
package editvois
import (
"bytes"
"fmt"
"html/template"
"net/http"
"os"
"code.google.com/awwwe-browser/data"
)
// handles the how to define a navigation section using the vois markup editor.
func HandlerHowToNavigation(w http.ResponseWriter, r *http.Request) {
var pdata *PageData
var err error
var t *templa... | Go |
package editvois
import (
"fmt"
"html/template"
"net/http"
"net/url"
"os"
"code.google.com/awwwe-browser/data"
)
type GeneralCSSData struct {
MaxWidth template.CSS
H3Size, H4Size, H5Size, H6Size template.CSS
ArticleContentSize, ArticleContentLineHeight templ... | Go |
package editvois
import (
"bytes"
"fmt"
"html/template"
"net/http"
"code.google.com/awwwe-browser/auralvm/voisfile"
"code.google.com/awwwe-browser/data"
)
// handles the editor startup page.
func HandlerEditor(w http.ResponseWriter, r *http.Request) {
HandlerEditorWithError(w, r, nil)
}
// handles the editor... | Go |
package editvois
import (
"bytes"
"errors"
"fmt"
"html/template"
"net/http"
"net/url"
"strings"
"gopkg.in/xmlpath.v2"
"code.google.com/awwwe-browser/auralvm/param"
"code.google.com/awwwe-browser/auralvm/voisfile"
"code.google.com/awwwe-browser/data"
"code.google.com/awwwe-browser/scrub"
"code.google.com... | Go |
package editvois
import (
"bytes"
"fmt"
"html/template"
"net/http"
"os"
"code.google.com/awwwe-browser/data"
)
// handles the how to define an article in a web page using the vois markup editor.
func HandlerHowToArticle(w http.ResponseWriter, r *http.Request) {
var pdata *PageData
var err error
var t *templ... | Go |
package editvois
import (
"bytes"
"fmt"
"html/template"
"net/http"
"os"
"code.google.com/awwwe-browser/data"
)
// handles the first page in the vois editor how to section.
func HandlerHowToLessons(w http.ResponseWriter, r *http.Request) {
var pdata *PageData
var err error
var t *template.Template
var cwd, ... | Go |
package editvois
import (
"bytes"
"fmt"
"html/template"
"net/http"
"os"
"code.google.com/awwwe-browser/data"
)
// Builds the default view.
func HandlerDefault(w http.ResponseWriter, r *http.Request) {
var pdata *PageData
var err error
var t *template.Template
var cwd, msg string
pdata = pageDataDefault()
... | Go |
package editvois
import (
"fmt"
"html/template"
"net/http"
"net/url"
"os"
"code.google.com/awwwe-browser/data"
)
type NavigationCSSData struct {
MaxWidth template.CSS
NavHeaderSize, AuthNavHe... | Go |
package editvois
import (
"fmt"
"net/http"
)
// build a view for errors when all else fails.
func errorOut(w http.ResponseWriter, err error) {
errorOutString(w, err.Error())
}
// build a view for errors when all else fails.
func errorOutString(w http.ResponseWriter, message string) {
fmt.Fprint(w, "<html><head><... | Go |
package editvois
import (
"fmt"
"html/template"
"net/http"
"net/url"
"os"
"code.google.com/awwwe-browser/data"
)
type HomeCSSData struct {
MaxWidth template.CSS
H1Width, H1Size template.CSS
}
func newHomeCSSData(screenwidth int) *HomeCSSData {
var v HomeCSSData
if screenwidth > 900 {
v.MaxWidth =... | Go |
package editvois
import (
"bytes"
"fmt"
"html/template"
"net/http"
"os"
"code.google.com/awwwe-browser/data"
)
// handles the how to define a form in a web page using the vois markup editor.
func HandlerHowToForm(w http.ResponseWriter, r *http.Request) {
var pdata *PageData
var err error
var t *template.Tem... | Go |
package editvois
import (
"bytes"
"fmt"
"html/template"
"net/http"
"os"
"code.google.com/awwwe-browser/data"
)
// handles the page which explains the true kiss image.
func HandlerTrueKiss(w http.ResponseWriter, r *http.Request) {
var pdata *PageData
var err error
var t *template.Template
var cwd, msg strin... | Go |
package editvois
import (
"bytes"
"fmt"
"html/template"
"net/http"
"os"
"code.google.com/awwwe-browser/data"
)
// handles the vois editors intorduction to xpath expressions.
func HandlerHowToXpathIntro(w http.ResponseWriter, r *http.Request) {
var pdata *PageData
var err error
var t *template.Template
var ... | Go |
// Package editvois impliments the view model for the vois markup editor and its pages.
package editvois
import (
"fmt"
"html/template"
"net/url"
"time"
"code.google.com/awwwe-browser/auralvm/param"
"code.google.com/awwwe-browser/data"
)
var (
Scheme string
Host string
Port int
Package string
H... | Go |
package editvois
import (
"fmt"
"html/template"
"net/http"
"net/url"
"os"
"code.google.com/awwwe-browser/data"
)
type FormCSSData struct {
InputWidth template.CSS
}
// builds a pointer to the form css template.
func newFormCSSData(screenwidth int) *FormCSSData {
var v FormCSSData
if screenwidth > 900 {
v... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package spdy
import (
"compress/zlib"
"encoding/binary"
"io"
"net/http"
"strings"
)
func (frame *SynStreamFrame) read(h ControlFrameHeader, f *Framer) er... | Go |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package spdy
// headerDictionary is the dictionary sent to the zlib compressor/decompressor.
var headerDictionary = []byte{
0x00, 0x00, 0x00, 0x07, 0x6f, 0x70... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package spdy
import (
"encoding/binary"
"io"
"net/http"
"strings"
)
func (frame *SynStreamFrame) write(f *Framer) error {
return f.writeSynStreamFrame(fr... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package spdy implements the SPDY protocol (currently SPDY/3), described in
// http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3.
package spdy
... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package websocket implements a client and server for the WebSocket protocol
// as specified in RFC 6455.
package websocket
import (
"bufio"
"crypto/tls"
... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package websocket
// This file implements a protocol of hybi draft.
// http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17
import (
"bufio"
"... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package websocket
import (
"bufio"
"fmt"
"io"
"net/http"
)
func newServerConn(rwc io.ReadWriteCloser, buf *bufio.ReadWriter, req *http.Request, config *Co... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package websocket
import (
"bufio"
"crypto/tls"
"io"
"net"
"net/http"
"net/url"
)
// DialError is an error that occurs while dialling a websocket server... | Go |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd openbsd
package ipv6
import (
"net"
"os"
"unsafe"
)
func setsockoptIPMreq(fd int, opt *sockOpt, ifi *net.... | Go |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
// +godefs map struct_in6_addr [16]byte /* in6_addr */
package ipv6
/*
#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.... | Go |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv6
import (
"net"
"syscall"
"unsafe"
"golang.org/x/net/internal/iana"
)
type sysSockoptLen int32
var (
ctlOpts = [ctlMax]ctlOpt{
ctlTraffi... | Go |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build nacl plan9
package ipv6
type sysICMPv6Filter struct {
}
func (f *sysICMPv6Filter) accept(typ ICMPType) {
}
func (f *sysICMPv6Filter) block(typ IC... | Go |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build nacl plan9 solaris
package ipv6
func (c *genericOpt) sysfd() (int, error) {
return 0, errOpNoSupport
}
func (c *dgramOpt) sysfd() (int, error) {
... | Go |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !darwin,!freebsd,!linux
package ipv6
import "net"
func setsockoptGroupReq(fd int, opt *sockOpt, ifi *net.Interface, grp net.IP) error {
return err... | Go |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv6
import (
"errors"
"fmt"
"net"
)
const (
Version = 6 // protocol version
HeaderLen = 40 // header length
)
// A Header represents an IPv6... | Go |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd openbsd
package ipv6
import (
"os"
"syscall"
"golang.org/x/net/internal/iana"
)
func setControlMessage(f... | Go |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd openbsd windows
package ipv6
import (
"net"
"syscall"
)
// MulticastHopLimit returns the hop limit field v... | Go |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv6
import (
"net"
"syscall"
"golang.org/x/net/internal/iana"
)
const (
// See ws2tcpip.h.
sysIPV6_UNICAST_HOPS = 0x4
sysIPV6_MULTICAST_IF ... | Go |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build dragonfly netbsd openbsd
package ipv6
import (
"net"
"syscall"
"golang.org/x/net/internal/iana"
)
type sysSockoptLen int32
var (
ctlOpts = [... | Go |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
// +godefs map struct_in6_addr [16]byte /* in6_addr */
package ipv6
/*
#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.... | Go |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build nacl plan9 solaris
package ipv6
type sysSockoptLen int32
var (
ctlOpts = [ctlMax]ctlOpt{}
sockOpts = [ssoMax]sockOpt{}
)
| Go |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
// +godefs map struct_in6_addr [16]byte /* in6_addr */
package ipv6
/*
#define __APPLE_USE_RFC_3542
#include <netinet/in.h>
#include <netine... | Go |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv6
import (
"net"
"syscall"
"unsafe"
"golang.org/x/net/internal/iana"
)
type sysSockoptLen int32
var (
ctlOpts = [ctlMax]ctlOpt{
ctlHopLim... | Go |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux,amd64 linux,arm netbsd openbsd
package ipv6
import (
"syscall"
"unsafe"
)
func getsockopt(fd, level, name int, v ... | Go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.