_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c171900
// true if the element is inline one
c171901
// newHTMLTag creates and returns an HTML tag.
c171902
// extractTag extracts and returns a tag.
c171903
// extractID extracts and returns an ID.
c171904
// extractClasses extracts and returns classes.
c171905
// parseTokens parses the tokens and return them
c171906
// newPlainText creates and returns a plain text.
c171907
// isHelperMethod returns true if the line is a helper method.
c171908
// isHelperMethodOf returns true if the line is a specified helper method.
c171909
// isPlainText returns true if the line is a plain text.
c171910
// isHTMLComment returns true if the line is an HTML comment.
c171911
// isAction returns true if the line is an action.
c171912
// fileName returns the file name.
c171913
// childOf returns true if the line is a child of the element.
c171914
// indent returns the line's indent.
c171915
// InitializeOptions initializes the options.
c171916
// AddNoCloseTagName appends name to .NoCloseTagNames set.
c171917
// DeleteNoCloseTagName deletes name from .NoCloseTagNames set.
c171918
// Asset loads and returns the asset for the given name. // It returns an error if the asset could not be found or // could not be loaded.
c171919
// newAction creates and returns an action.
c171920
// AddRelayTransport constructs a relay and adds it as a transport to the host network.
c171921
// NewRelay constructs a new relay.
c171922
// ParseJSONBody parses a JSON body.
c171923
// New makes a new Runner with the given testing T target and the // root URL.
c171924
// RunGroup runs a parse.Group. // Consider RunFile instead.
c171925
// ParseFile parses the specified files.
c171926
// ParseLine makes a new Line with the given data.
c171927
// Capture extracts the first placeholder value from the // comments.
c171928
// Bytes gets the joined bytes of all lines.
c171929
// Equal gets whether the Data and specified value are equal. // Supports regexp values.
c171930
// Type gets a string describing the type of this Value.
c171931
// NewServer makes a new example server.
c171932
// PrettyPrintAsJSON marshalles input as indented JSON // and calles fmt.Println with the result. // If indent arguments are given, they are joined into // a string and used as JSON line indent. // If no indet argument is given, two spaces will be used // to indent JSON lines.
c171933
// StringMarshalJSON marshals data to an indented string.
c171934
// StringMD5Hex returns the hex encoded MD5 hash of data
c171935
// StringSHA1Base64 returns the base64 encoded SHA1 hash of data
c171936
// StringJoinFormat formats every value in values with format // and joins the result with sep as separator. // values must be a slice of a formatable type
c171937
// StringJoin formats every value in values according to its default formatting // and joins the result with sep as separator. // values must be a slice of a formatable type
c171938
// Less reports whether the element with // index i should sort before the element with index j.
c171939
// Swap swaps the elements with indexes i and j.
c171940
// Map a function on each element of a slice of strings.
c171941
// Filter out all strings where the function does not return true.
c171942
// StringFindBetween returns the string between the first occurrences of the tokens start and stop. // The remainder of the string after the stop token will be returned if found. // If the tokens couldn't be found, then the whole string will be returned as remainder.
c171943
// StringFind returns in found if token has been found in s, // and returns the remaining string afte token in remainder. // The whole string s will be returned if found is false.
c171944
// EncryptAES encrypts plaintext using AES with the given key. // key should be either 16, 24, or 32 bytes to select // AES-128, AES-192, or AES-256. // plaintext must not be shorter than key.
c171945
// DecryptAES decrypts ciphertext using AES with the given key. // key should be either 16, 24, or 32 bytes to select // AES-128, AES-192, or AES-256.
c171946
// PanicIfErr panics with a stack trace if any // of the passed args is a non nil error
c171947
// AsError returns r as error, converting it when necessary
c171948
// FirstError returns the first non nil error, or nil
c171949
// LastError returns the last non nil error, or nil
c171950
// AsErrorList checks if err is already an ErrorList // and returns it if this is the case. // Else an ErrorList with err as element is created. // Useful if a function potentially returns an ErrorList as error // and you want to avoid creating nested ErrorLists.
c171951
// Error calls fmt.Println for of every error in the list // and returns the concernated text. // Can be called for a nil ErrorList.
c171952
// Last returns the last error in the list or nil. // Can be called for a nil ErrorList.
c171953
// Collect adds any non nil errors in args to the list.
c171954
// HTTPCompressHandlerFunc wraps a http.HandlerFunc so that the response gets // gzip or deflate compressed if the Accept-Encoding header of the request allows it.
c171955
// HTTPPostJSON marshalles data as JSON // and sends it as HTTP POST request to url. // If the response status code is not 200 OK, // then the status is returned as an error.
c171956
// HTTPDelete performs a HTTP DELETE request
c171957
// HTTPUnmarshalRequestBodyJSON reads a http.Request body and unmarshals it as JSON to result.
c171958
// GetWriter returns flate.Writer from the pool, or creates a new one // with flate.BestCompression if the pool is empty.
c171959
// ReturnWriter returns a flate.Writer to the pool that can // late be reused via GetWriter. // Don't close the writer, Flush will be called before returning // it to the pool.
c171960
// GetWriter returns gzip.Writer from the pool, or creates a new one // with gzip.BestCompression if the pool is empty.
c171961
// ReturnWriter returns a gzip.Writer to the pool that can // late be reused via GetWriter. // Don't close the writer, Flush will be called before returning // it to the pool.
c171962
// FileGetLines returns a string slice with the text lines of filenameOrURL. // The lines can be separated by \n or \r\n.
c171963
// FileGetLastLine reads the last line from a file. // In case of a network file, the whole file is read. // In case of a local file, the last 64kb are read, // so if the last line is longer than 64kb it is not returned completely. // The first optional timeout is used for network files only.
c171964
// FileSize returns the size of a file or zero in case of an error.
c171965
// BytesHead returns at most numLines from data starting at the beginning. // A slice of the remaining data is returned as rest. // \n is used to detect line ends, a preceding \r will be stripped away. // BytesHead resembles the Unix head command.
c171966
// BytesMap maps a function on each element of a slice of bytes.
c171967
// BytesFilter filters out all bytes where the function does not return true.
c171968
// ReflectSetStructFieldString sets the field with name to value.
c171969
// ReadBinary wraps binary.Read with a CountingReader and returns // the acutal bytes read by it.
c171970
// WriteFull calls writer.Write until all of data is written, // or an is error returned.
c171971
// ReadLine reads unbuffered until a newline '\n' byte and removes // an optional carriege return '\r' at the end of the line. // In case of an error, the string up to the error is returned.
c171972
// WaitForStdin blocks until input is available from os.Stdin. // The first byte from os.Stdin is returned as result. // If there are println arguments, then fmt.Println will be // called with those before reading from os.Stdin.
c171973
// GetenvDefault retrieves the value of the environment variable // named by the key. It returns the given defaultValue if the // variable is not present.
c171974
// NetIP returns the primary IP address of the system or an empty string.
c171975
// RealNetIP returns the real local IP of the system or an empty string.
c171976
// Load loads YAML files from `configPaths`. // and assigns decoded values into the `conf` value.
c171977
// Load loads JSON files from `configPaths`. // and assigns decoded values into the `conf` value.
c171978
// Load loads TOML files from `configPaths`. // and assigns decoded values into the `conf` value.
c171979
// LoadBytes loads YAML bytes
c171980
// LoadJSONBytes loads JSON bytes
c171981
// LoadTOMLBytes loads TOML bytes
c171982
// LoadWithEnvJSON loads JSON files with Env
c171983
// LoadWithEnvTOML loads TOML files with Env
c171984
// LoadWithEnvBytes loads YAML bytes with Env
c171985
// LoadWithEnvJSONBytes loads JSON bytes with Env
c171986
// LoadWithEnvTOMLBytes loads TOML bytes with Env
c171987
// Crop retrieves an image that is a // cropped copy of the original img. // // The crop is made given the informations provided in config.
c171988
// computeSize retrieve the effective size of the cropped image. // It is defined by Height, Width, and Ratio option.
c171989
// computedCropArea retrieve the theorical crop area. // It is defined by Height, Width, Mode and
c171990
// NewThen creates a new Then command.
c171991
// NewLongThen creates a new long running Then comand.
c171992
// Command returns the full command as configured in Caddyfile.
c171993
// Exec executes the command initiated in gitCmd.
c171994
// haltProcess halts the running process
c171995
// runCmd is a helper function to run commands. // It runs command with args from directory at dir. // The executed process outputs to os.Stderr
c171996
// runCmdOutput is a helper function to run commands and return output. // It runs command with args from directory at dir. // If successful, returns output and nil error
c171997
// Init validates git installation, locates the git executable // binary in PATH and check for available shell to use.
c171998
// writeScriptFile writes content to a temporary file. // It changes the temporary file mode to executable and // closes it to prepare it for execution.
c171999
// gitWrapperScript forms content for git.sh script