diff --git a/run/convert.go b/run/convert.go index cfce2e1..54e4e90 100644 --- a/run/convert.go +++ b/run/convert.go @@ -41,9 +41,6 @@ func makeData(log *log.Logger, info *database.Info, cfg *Config) (*data.DBData, enum := &data.Enum{ DBName: e.Name, Schema: sch, - Table: &data.Table{ - DBName: e.Table, - }, } sch.Enums = append(sch.Enums, enum) enum.Name, err = convert(e.Name) diff --git a/run/generate.go b/run/generate.go index 67d7b28..6ee4b4a 100644 --- a/run/generate.go +++ b/run/generate.go @@ -74,7 +74,7 @@ func generateSchemas(env environ.Values, cfg *Config, db *data.DBData) error { func generateEnums(env environ.Values, cfg *Config, db *data.DBData) error { for _, schema := range db.Schemas { for _, enum := range schema.Enums { - fileData := struct{ Schema, Enum, Table string }{Schema: schema.Name, Enum: enum.Name, Table: enum.Table.DBName} + fileData := struct{ Schema, Enum string }{Schema: schema.Name, Enum: enum.Name} contents := data.EnumData{ Enum: enum, DB: db, diff --git a/vendor/github.com/BurntSushi/toml/_examples/example.go b/vendor/github.com/BurntSushi/toml/_examples/example.go deleted file mode 100644 index 79f31f2..0000000 --- a/vendor/github.com/BurntSushi/toml/_examples/example.go +++ /dev/null @@ -1,61 +0,0 @@ -package main - -import ( - "fmt" - "time" - - "github.com/BurntSushi/toml" -) - -type tomlConfig struct { - Title string - Owner ownerInfo - DB database `toml:"database"` - Servers map[string]server - Clients clients -} - -type ownerInfo struct { - Name string - Org string `toml:"organization"` - Bio string - DOB time.Time -} - -type database struct { - Server string - Ports []int - ConnMax int `toml:"connection_max"` - Enabled bool -} - -type server struct { - IP string - DC string -} - -type clients struct { - Data [][]interface{} - Hosts []string -} - -func main() { - var config tomlConfig - if _, err := toml.DecodeFile("example.toml", &config); err != nil { - fmt.Println(err) - return - } - - fmt.Printf("Title: %s\n", config.Title) - fmt.Printf("Owner: %s (%s, %s), Born: %s\n", - config.Owner.Name, config.Owner.Org, config.Owner.Bio, - config.Owner.DOB) - fmt.Printf("Database: %s %v (Max conn. %d), Enabled? %v\n", - config.DB.Server, config.DB.Ports, config.DB.ConnMax, - config.DB.Enabled) - for serverName, server := range config.Servers { - fmt.Printf("Server: %s (%s, %s)\n", serverName, server.IP, server.DC) - } - fmt.Printf("Client data: %v\n", config.Clients.Data) - fmt.Printf("Client hosts: %v\n", config.Clients.Hosts) -} diff --git a/vendor/github.com/BurntSushi/toml/_examples/example.toml b/vendor/github.com/BurntSushi/toml/_examples/example.toml deleted file mode 100644 index 32c7a4f..0000000 --- a/vendor/github.com/BurntSushi/toml/_examples/example.toml +++ /dev/null @@ -1,35 +0,0 @@ -# This is a TOML document. Boom. - -title = "TOML Example" - -[owner] -name = "Tom Preston-Werner" -organization = "GitHub" -bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." -dob = 1979-05-27T07:32:00Z # First class dates? Why not? - -[database] -server = "192.168.1.1" -ports = [ 8001, 8001, 8002 ] -connection_max = 5000 -enabled = true - -[servers] - - # You can indent as you please. Tabs or spaces. TOML don't care. - [servers.alpha] - ip = "10.0.0.1" - dc = "eqdc10" - - [servers.beta] - ip = "10.0.0.2" - dc = "eqdc10" - -[clients] -data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it - -# Line breaks are OK when inside arrays -hosts = [ - "alpha", - "omega" -] diff --git a/vendor/github.com/BurntSushi/toml/_examples/hard.toml b/vendor/github.com/BurntSushi/toml/_examples/hard.toml deleted file mode 100644 index 26145d2..0000000 --- a/vendor/github.com/BurntSushi/toml/_examples/hard.toml +++ /dev/null @@ -1,22 +0,0 @@ -# Test file for TOML -# Only this one tries to emulate a TOML file written by a user of the kind of parser writers probably hate -# This part you'll really hate - -[the] -test_string = "You'll hate me after this - #" # " Annoying, isn't it? - - [the.hard] - test_array = [ "] ", " # "] # ] There you go, parse this! - test_array2 = [ "Test #11 ]proved that", "Experiment #9 was a success" ] - # You didn't think it'd as easy as chucking out the last #, did you? - another_test_string = " Same thing, but with a string #" - harder_test_string = " And when \"'s are in the string, along with # \"" # "and comments are there too" - # Things will get harder - - [the.hard.bit#] - what? = "You don't think some user won't do that?" - multi_line_array = [ - "]", - # ] Oh yes I did - ] - diff --git a/vendor/github.com/BurntSushi/toml/_examples/implicit.toml b/vendor/github.com/BurntSushi/toml/_examples/implicit.toml deleted file mode 100644 index 1dea5ce..0000000 --- a/vendor/github.com/BurntSushi/toml/_examples/implicit.toml +++ /dev/null @@ -1,4 +0,0 @@ -# [x] you -# [x.y] don't -# [x.y.z] need these -[x.y.z.w] # for this to work diff --git a/vendor/github.com/BurntSushi/toml/_examples/invalid-apples.toml b/vendor/github.com/BurntSushi/toml/_examples/invalid-apples.toml deleted file mode 100644 index 74e9e33..0000000 --- a/vendor/github.com/BurntSushi/toml/_examples/invalid-apples.toml +++ /dev/null @@ -1,6 +0,0 @@ -# DO NOT WANT -[fruit] -type = "apple" - -[fruit.type] -apple = "yes" diff --git a/vendor/github.com/BurntSushi/toml/_examples/invalid.toml b/vendor/github.com/BurntSushi/toml/_examples/invalid.toml deleted file mode 100644 index beb1dba..0000000 --- a/vendor/github.com/BurntSushi/toml/_examples/invalid.toml +++ /dev/null @@ -1,35 +0,0 @@ -# This is an INVALID TOML document. Boom. -# Can you spot the error without help? - -title = "TOML Example" - -[owner] -name = "Tom Preston-Werner" -organization = "GitHub" -bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." -dob = 1979-05-27T7:32:00Z # First class dates? Why not? - -[database] -server = "192.168.1.1" -ports = [ 8001, 8001, 8002 ] -connection_max = 5000 -enabled = true - -[servers] - # You can indent as you please. Tabs or spaces. TOML don't care. - [servers.alpha] - ip = "10.0.0.1" - dc = "eqdc10" - - [servers.beta] - ip = "10.0.0.2" - dc = "eqdc10" - -[clients] -data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it - -# Line breaks are OK when inside arrays -hosts = [ - "alpha", - "omega" -] diff --git a/vendor/github.com/BurntSushi/toml/_examples/readme1.toml b/vendor/github.com/BurntSushi/toml/_examples/readme1.toml deleted file mode 100644 index 3e1261d..0000000 --- a/vendor/github.com/BurntSushi/toml/_examples/readme1.toml +++ /dev/null @@ -1,5 +0,0 @@ -Age = 25 -Cats = [ "Cauchy", "Plato" ] -Pi = 3.14 -Perfection = [ 6, 28, 496, 8128 ] -DOB = 1987-07-05T05:45:00Z diff --git a/vendor/github.com/BurntSushi/toml/_examples/readme2.toml b/vendor/github.com/BurntSushi/toml/_examples/readme2.toml deleted file mode 100644 index b51cd93..0000000 --- a/vendor/github.com/BurntSushi/toml/_examples/readme2.toml +++ /dev/null @@ -1 +0,0 @@ -some_key_NAME = "wat" diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING b/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING deleted file mode 100644 index 5a8e332..0000000 --- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING +++ /dev/null @@ -1,14 +0,0 @@ - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. - diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md b/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md deleted file mode 100644 index 93f4e3a..0000000 --- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Implements the TOML test suite interface - -This is an implementation of the interface expected by -[toml-test](https://github.com/BurntSushi/toml-test) for my -[toml parser written in Go](https://github.com/BurntSushi/toml). -In particular, it maps TOML data on `stdin` to a JSON format on `stdout`. - - -Compatible with TOML version -[v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md) - -Compatible with `toml-test` version -[v0.2.0](https://github.com/BurntSushi/toml-test/tree/v0.2.0) diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go b/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go deleted file mode 100644 index 14e7557..0000000 --- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go +++ /dev/null @@ -1,90 +0,0 @@ -// Command toml-test-decoder satisfies the toml-test interface for testing -// TOML decoders. Namely, it accepts TOML on stdin and outputs JSON on stdout. -package main - -import ( - "encoding/json" - "flag" - "fmt" - "log" - "os" - "path" - "time" - - "github.com/BurntSushi/toml" -) - -func init() { - log.SetFlags(0) - - flag.Usage = usage - flag.Parse() -} - -func usage() { - log.Printf("Usage: %s < toml-file\n", path.Base(os.Args[0])) - flag.PrintDefaults() - - os.Exit(1) -} - -func main() { - if flag.NArg() != 0 { - flag.Usage() - } - - var tmp interface{} - if _, err := toml.DecodeReader(os.Stdin, &tmp); err != nil { - log.Fatalf("Error decoding TOML: %s", err) - } - - typedTmp := translate(tmp) - if err := json.NewEncoder(os.Stdout).Encode(typedTmp); err != nil { - log.Fatalf("Error encoding JSON: %s", err) - } -} - -func translate(tomlData interface{}) interface{} { - switch orig := tomlData.(type) { - case map[string]interface{}: - typed := make(map[string]interface{}, len(orig)) - for k, v := range orig { - typed[k] = translate(v) - } - return typed - case []map[string]interface{}: - typed := make([]map[string]interface{}, len(orig)) - for i, v := range orig { - typed[i] = translate(v).(map[string]interface{}) - } - return typed - case []interface{}: - typed := make([]interface{}, len(orig)) - for i, v := range orig { - typed[i] = translate(v) - } - - // We don't really need to tag arrays, but let's be future proof. - // (If TOML ever supports tuples, we'll need this.) - return tag("array", typed) - case time.Time: - return tag("datetime", orig.Format("2006-01-02T15:04:05Z")) - case bool: - return tag("bool", fmt.Sprintf("%v", orig)) - case int64: - return tag("integer", fmt.Sprintf("%d", orig)) - case float64: - return tag("float", fmt.Sprintf("%v", orig)) - case string: - return tag("string", orig) - } - - panic(fmt.Sprintf("Unknown type: %T", tomlData)) -} - -func tag(typeName string, data interface{}) map[string]interface{} { - return map[string]interface{}{ - "type": typeName, - "value": data, - } -} diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING b/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING deleted file mode 100644 index 5a8e332..0000000 --- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING +++ /dev/null @@ -1,14 +0,0 @@ - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. - diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md b/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md deleted file mode 100644 index a45bd4d..0000000 --- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Implements the TOML test suite interface for TOML encoders - -This is an implementation of the interface expected by -[toml-test](https://github.com/BurntSushi/toml-test) for the -[TOML encoder](https://github.com/BurntSushi/toml). -In particular, it maps JSON data on `stdin` to a TOML format on `stdout`. - - -Compatible with TOML version -[v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md) - -Compatible with `toml-test` version -[v0.2.0](https://github.com/BurntSushi/toml-test/tree/v0.2.0) diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go b/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go deleted file mode 100644 index 092cc68..0000000 --- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go +++ /dev/null @@ -1,131 +0,0 @@ -// Command toml-test-encoder satisfies the toml-test interface for testing -// TOML encoders. Namely, it accepts JSON on stdin and outputs TOML on stdout. -package main - -import ( - "encoding/json" - "flag" - "log" - "os" - "path" - "strconv" - "time" - - "github.com/BurntSushi/toml" -) - -func init() { - log.SetFlags(0) - - flag.Usage = usage - flag.Parse() -} - -func usage() { - log.Printf("Usage: %s < json-file\n", path.Base(os.Args[0])) - flag.PrintDefaults() - - os.Exit(1) -} - -func main() { - if flag.NArg() != 0 { - flag.Usage() - } - - var tmp interface{} - if err := json.NewDecoder(os.Stdin).Decode(&tmp); err != nil { - log.Fatalf("Error decoding JSON: %s", err) - } - - tomlData := translate(tmp) - if err := toml.NewEncoder(os.Stdout).Encode(tomlData); err != nil { - log.Fatalf("Error encoding TOML: %s", err) - } -} - -func translate(typedJson interface{}) interface{} { - switch v := typedJson.(type) { - case map[string]interface{}: - if len(v) == 2 && in("type", v) && in("value", v) { - return untag(v) - } - m := make(map[string]interface{}, len(v)) - for k, v2 := range v { - m[k] = translate(v2) - } - return m - case []interface{}: - tabArray := make([]map[string]interface{}, len(v)) - for i := range v { - if m, ok := translate(v[i]).(map[string]interface{}); ok { - tabArray[i] = m - } else { - log.Fatalf("JSON arrays may only contain objects. This " + - "corresponds to only tables being allowed in " + - "TOML table arrays.") - } - } - return tabArray - } - log.Fatalf("Unrecognized JSON format '%T'.", typedJson) - panic("unreachable") -} - -func untag(typed map[string]interface{}) interface{} { - t := typed["type"].(string) - v := typed["value"] - switch t { - case "string": - return v.(string) - case "integer": - v := v.(string) - n, err := strconv.Atoi(v) - if err != nil { - log.Fatalf("Could not parse '%s' as integer: %s", v, err) - } - return n - case "float": - v := v.(string) - f, err := strconv.ParseFloat(v, 64) - if err != nil { - log.Fatalf("Could not parse '%s' as float64: %s", v, err) - } - return f - case "datetime": - v := v.(string) - t, err := time.Parse("2006-01-02T15:04:05Z", v) - if err != nil { - log.Fatalf("Could not parse '%s' as a datetime: %s", v, err) - } - return t - case "bool": - v := v.(string) - switch v { - case "true": - return true - case "false": - return false - } - log.Fatalf("Could not parse '%s' as a boolean.", v) - case "array": - v := v.([]interface{}) - array := make([]interface{}, len(v)) - for i := range v { - if m, ok := v[i].(map[string]interface{}); ok { - array[i] = untag(m) - } else { - log.Fatalf("Arrays may only contain other arrays or "+ - "primitive values, but found a '%T'.", m) - } - } - return array - } - log.Fatalf("Unrecognized tag type '%s'.", t) - panic("unreachable") -} - -func in(key string, m map[string]interface{}) bool { - _, ok := m[key] - return ok -} diff --git a/vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING b/vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING deleted file mode 100644 index 5a8e332..0000000 --- a/vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING +++ /dev/null @@ -1,14 +0,0 @@ - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. - diff --git a/vendor/github.com/BurntSushi/toml/cmd/tomlv/README.md b/vendor/github.com/BurntSushi/toml/cmd/tomlv/README.md deleted file mode 100644 index 51231e2..0000000 --- a/vendor/github.com/BurntSushi/toml/cmd/tomlv/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# TOML Validator - -If Go is installed, it's simple to try it out: - -```bash -go get github.com/BurntSushi/toml/cmd/tomlv -tomlv some-toml-file.toml -``` - -You can see the types of every key in a TOML file with: - -```bash -tomlv -types some-toml-file.toml -``` - -At the moment, only one error message is reported at a time. Error messages -include line numbers. No output means that the files given are valid TOML, or -there is a bug in `tomlv`. - -Compatible with TOML version -[v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md) diff --git a/vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go b/vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go deleted file mode 100644 index c7d689a..0000000 --- a/vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go +++ /dev/null @@ -1,61 +0,0 @@ -// Command tomlv validates TOML documents and prints each key's type. -package main - -import ( - "flag" - "fmt" - "log" - "os" - "path" - "strings" - "text/tabwriter" - - "github.com/BurntSushi/toml" -) - -var ( - flagTypes = false -) - -func init() { - log.SetFlags(0) - - flag.BoolVar(&flagTypes, "types", flagTypes, - "When set, the types of every defined key will be shown.") - - flag.Usage = usage - flag.Parse() -} - -func usage() { - log.Printf("Usage: %s toml-file [ toml-file ... ]\n", - path.Base(os.Args[0])) - flag.PrintDefaults() - - os.Exit(1) -} - -func main() { - if flag.NArg() < 1 { - flag.Usage() - } - for _, f := range flag.Args() { - var tmp interface{} - md, err := toml.DecodeFile(f, &tmp) - if err != nil { - log.Fatalf("Error in '%s': %s", f, err) - } - if flagTypes { - printTypes(md) - } - } -} - -func printTypes(md toml.MetaData) { - tabw := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0) - for _, key := range md.Keys() { - fmt.Fprintf(tabw, "%s%s\t%s\n", - strings.Repeat(" ", len(key)-1), key, md.Type(key...)) - } - tabw.Flush() -} diff --git a/vendor/github.com/go-sql-driver/mysql/.github/ISSUE_TEMPLATE.md b/vendor/github.com/go-sql-driver/mysql/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index d9771f1..0000000 --- a/vendor/github.com/go-sql-driver/mysql/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,21 +0,0 @@ -### Issue description -Tell us what should happen and what happens instead - -### Example code -```go -If possible, please enter some example code here to reproduce the issue. -``` - -### Error log -``` -If you have an error log, please paste it here. -``` - -### Configuration -*Driver version (or git SHA):* - -*Go version:* run `go version` in your console - -*Server version:* E.g. MySQL 5.6, MariaDB 10.0.20 - -*Server OS:* E.g. Debian 8.1 (Jessie), Windows 10 diff --git a/vendor/github.com/go-sql-driver/mysql/.github/PULL_REQUEST_TEMPLATE.md b/vendor/github.com/go-sql-driver/mysql/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 6f5c7eb..0000000 --- a/vendor/github.com/go-sql-driver/mysql/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,9 +0,0 @@ -### Description -Please explain the changes you made here. - -### Checklist -- [ ] Code compiles correctly -- [ ] Created tests which fail without the change (if possible) -- [ ] All tests passing -- [ ] Extended the README / documentation, if necessary -- [ ] Added myself / the copyright holder to the AUTHORS file diff --git a/vendor/github.com/google/go-cmp/cmp/cmpopts/equate.go b/vendor/github.com/google/go-cmp/cmp/cmpopts/equate.go deleted file mode 100644 index cc39492..0000000 --- a/vendor/github.com/google/go-cmp/cmp/cmpopts/equate.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2017, 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.md file. - -// Package cmpopts provides common options for the cmp package. -package cmpopts - -import ( - "math" - "reflect" - - "github.com/google/go-cmp/cmp" -) - -func equateAlways(_, _ interface{}) bool { return true } - -// EquateEmpty returns a Comparer option that determines all maps and slices -// with a length of zero to be equal, regardless of whether they are nil. -// -// EquateEmpty can be used in conjuction with SortSlices and SortMaps. -func EquateEmpty() cmp.Option { - return cmp.FilterValues(isEmpty, cmp.Comparer(equateAlways)) -} - -func isEmpty(x, y interface{}) bool { - vx, vy := reflect.ValueOf(x), reflect.ValueOf(y) - return (x != nil && y != nil && vx.Type() == vy.Type()) && - (vx.Kind() == reflect.Slice || vx.Kind() == reflect.Map) && - (vx.Len() == 0 && vy.Len() == 0) -} - -// EquateApprox returns a Comparer option that determines float32 or float64 -// values to be equal if they are within a relative fraction or absolute margin. -// This option is not used when either x or y is NaN or infinite. -// -// The fraction determines that the difference of two values must be within the -// smaller fraction of the two values, while the margin determines that the two -// values must be within some absolute margin. -// To express only a fraction or only a margin, use 0 for the other parameter. -// The fraction and margin must be non-negative. -// -// The mathematical expression used is equivalent to: -// |x-y| ≤ max(fraction*min(|x|, |y|), margin) -// -// EquateApprox can be used in conjuction with EquateNaNs. -func EquateApprox(fraction, margin float64) cmp.Option { - if margin < 0 || fraction < 0 || math.IsNaN(margin) || math.IsNaN(fraction) { - panic("margin or fraction must be a non-negative number") - } - a := approximator{fraction, margin} - return cmp.Options{ - cmp.FilterValues(areRealF64s, cmp.Comparer(a.compareF64)), - cmp.FilterValues(areRealF32s, cmp.Comparer(a.compareF32)), - } -} - -type approximator struct{ frac, marg float64 } - -func areRealF64s(x, y float64) bool { - return !math.IsNaN(x) && !math.IsNaN(y) && !math.IsInf(x, 0) && !math.IsInf(y, 0) -} -func areRealF32s(x, y float32) bool { - return areRealF64s(float64(x), float64(y)) -} -func (a approximator) compareF64(x, y float64) bool { - relMarg := a.frac * math.Min(math.Abs(x), math.Abs(y)) - return math.Abs(x-y) <= math.Max(a.marg, relMarg) -} -func (a approximator) compareF32(x, y float32) bool { - return a.compareF64(float64(x), float64(y)) -} - -// EquateNaNs returns a Comparer option that determines float32 and float64 -// NaN values to be equal. -// -// EquateNaNs can be used in conjuction with EquateApprox. -func EquateNaNs() cmp.Option { - return cmp.Options{ - cmp.FilterValues(areNaNsF64s, cmp.Comparer(equateAlways)), - cmp.FilterValues(areNaNsF32s, cmp.Comparer(equateAlways)), - } -} - -func areNaNsF64s(x, y float64) bool { - return math.IsNaN(x) && math.IsNaN(y) -} -func areNaNsF32s(x, y float32) bool { - return areNaNsF64s(float64(x), float64(y)) -} diff --git a/vendor/github.com/google/go-cmp/cmp/cmpopts/ignore.go b/vendor/github.com/google/go-cmp/cmp/cmpopts/ignore.go deleted file mode 100644 index 016891d..0000000 --- a/vendor/github.com/google/go-cmp/cmp/cmpopts/ignore.go +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright 2017, 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.md file. - -package cmpopts - -import ( - "fmt" - "reflect" - "unicode" - "unicode/utf8" - - "github.com/google/go-cmp/cmp" -) - -// IgnoreFields returns an Option that ignores exported fields of the -// given names on a single struct type. -// The struct type is specified by passing in a value of that type. -// -// The name may be a dot-delimited string (e.g., "Foo.Bar") to ignore a -// specific sub-field that is embedded or nested within the parent struct. -// -// This does not handle unexported fields; use IgnoreUnexported instead. -func IgnoreFields(typ interface{}, names ...string) cmp.Option { - sf := newStructFilter(typ, names...) - return cmp.FilterPath(sf.filter, cmp.Ignore()) -} - -// IgnoreTypes returns an Option that ignores all values assignable to -// certain types, which are specified by passing in a value of each type. -func IgnoreTypes(typs ...interface{}) cmp.Option { - tf := newTypeFilter(typs...) - return cmp.FilterPath(tf.filter, cmp.Ignore()) -} - -type typeFilter []reflect.Type - -func newTypeFilter(typs ...interface{}) (tf typeFilter) { - for _, typ := range typs { - t := reflect.TypeOf(typ) - if t == nil { - // This occurs if someone tries to pass in sync.Locker(nil) - panic("cannot determine type; consider using IgnoreInterfaces") - } - tf = append(tf, t) - } - return tf -} -func (tf typeFilter) filter(p cmp.Path) bool { - if len(p) < 1 { - return false - } - t := p[len(p)-1].Type() - for _, ti := range tf { - if t.AssignableTo(ti) { - return true - } - } - return false -} - -// IgnoreInterfaces returns an Option that ignores all values or references of -// values assignable to certain interface types. These interfaces are specified -// by passing in an anonymous struct with the interface types embedded in it. -// For example, to ignore sync.Locker, pass in struct{sync.Locker}{}. -func IgnoreInterfaces(ifaces interface{}) cmp.Option { - tf := newIfaceFilter(ifaces) - return cmp.FilterPath(tf.filter, cmp.Ignore()) -} - -type ifaceFilter []reflect.Type - -func newIfaceFilter(ifaces interface{}) (tf ifaceFilter) { - t := reflect.TypeOf(ifaces) - if ifaces == nil || t.Name() != "" || t.Kind() != reflect.Struct { - panic("input must be an anonymous struct") - } - for i := 0; i < t.NumField(); i++ { - fi := t.Field(i) - switch { - case !fi.Anonymous: - panic("struct cannot have named fields") - case fi.Type.Kind() != reflect.Interface: - panic("embedded field must be an interface type") - case fi.Type.NumMethod() == 0: - // This matches everything; why would you ever want this? - panic("cannot ignore empty interface") - default: - tf = append(tf, fi.Type) - } - } - return tf -} -func (tf ifaceFilter) filter(p cmp.Path) bool { - if len(p) < 1 { - return false - } - t := p[len(p)-1].Type() - for _, ti := range tf { - if t.AssignableTo(ti) { - return true - } - if t.Kind() != reflect.Ptr && reflect.PtrTo(t).AssignableTo(ti) { - return true - } - } - return false -} - -// IgnoreUnexported returns an Option that only ignores the immediate unexported -// fields of a struct, including anonymous fields of unexported types. -// In particular, unexported fields within the struct's exported fields -// of struct types, including anonymous fields, will not be ignored unless the -// type of the field itself is also passed to IgnoreUnexported. -func IgnoreUnexported(typs ...interface{}) cmp.Option { - ux := newUnexportedFilter(typs...) - return cmp.FilterPath(ux.filter, cmp.Ignore()) -} - -type unexportedFilter struct{ m map[reflect.Type]bool } - -func newUnexportedFilter(typs ...interface{}) unexportedFilter { - ux := unexportedFilter{m: make(map[reflect.Type]bool)} - for _, typ := range typs { - t := reflect.TypeOf(typ) - if t == nil || t.Kind() != reflect.Struct { - panic(fmt.Sprintf("invalid struct type: %T", typ)) - } - ux.m[t] = true - } - return ux -} -func (xf unexportedFilter) filter(p cmp.Path) bool { - if len(p) < 2 { - return false - } - sf, ok := p[len(p)-1].(cmp.StructField) - if !ok { - return false - } - return xf.m[p[len(p)-2].Type()] && !isExported(sf.Name()) -} - -// isExported reports whether the identifier is exported. -func isExported(id string) bool { - r, _ := utf8.DecodeRuneInString(id) - return unicode.IsUpper(r) -} diff --git a/vendor/github.com/google/go-cmp/cmp/cmpopts/sort.go b/vendor/github.com/google/go-cmp/cmp/cmpopts/sort.go deleted file mode 100644 index a566d24..0000000 --- a/vendor/github.com/google/go-cmp/cmp/cmpopts/sort.go +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright 2017, 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.md file. - -package cmpopts - -import ( - "fmt" - "reflect" - - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/internal/function" -) - -// SortSlices returns a Transformer option that sorts all []V. -// The less function must be of the form "func(T, T) bool" which is used to -// sort any slice with element type V that is assignable to T. -// -// The less function must be: -// • Deterministic: less(x, y) == less(x, y) -// • Irreflexive: !less(x, x) -// • Transitive: if !less(x, y) and !less(y, z), then !less(x, z) -// -// The less function does not have to be "total". That is, if !less(x, y) and -// !less(y, x) for two elements x and y, their relative order is maintained. -// -// SortSlices can be used in conjuction with EquateEmpty. -func SortSlices(less interface{}) cmp.Option { - vf := reflect.ValueOf(less) - if !function.IsType(vf.Type(), function.Less) || vf.IsNil() { - panic(fmt.Sprintf("invalid less function: %T", less)) - } - ss := sliceSorter{vf.Type().In(0), vf} - return cmp.FilterValues(ss.filter, cmp.Transformer("Sort", ss.sort)) -} - -type sliceSorter struct { - in reflect.Type // T - fnc reflect.Value // func(T, T) bool -} - -func (ss sliceSorter) filter(x, y interface{}) bool { - vx, vy := reflect.ValueOf(x), reflect.ValueOf(y) - if !(x != nil && y != nil && vx.Type() == vy.Type()) || - !(vx.Kind() == reflect.Slice && vx.Type().Elem().AssignableTo(ss.in)) || - (vx.Len() <= 1 && vy.Len() <= 1) { - return false - } - // Check whether the slices are already sorted to avoid an infinite - // recursion cycle applying the same transform to itself. - ok1 := sliceIsSorted(x, func(i, j int) bool { return ss.less(vx, i, j) }) - ok2 := sliceIsSorted(y, func(i, j int) bool { return ss.less(vy, i, j) }) - return !ok1 || !ok2 -} -func (ss sliceSorter) sort(x interface{}) interface{} { - src := reflect.ValueOf(x) - dst := reflect.MakeSlice(src.Type(), src.Len(), src.Len()) - for i := 0; i < src.Len(); i++ { - dst.Index(i).Set(src.Index(i)) - } - sortSliceStable(dst.Interface(), func(i, j int) bool { return ss.less(dst, i, j) }) - ss.checkSort(dst) - return dst.Interface() -} -func (ss sliceSorter) checkSort(v reflect.Value) { - start := -1 // Start of a sequence of equal elements. - for i := 1; i < v.Len(); i++ { - if ss.less(v, i-1, i) { - // Check that first and last elements in v[start:i] are equal. - if start >= 0 && (ss.less(v, start, i-1) || ss.less(v, i-1, start)) { - panic(fmt.Sprintf("incomparable values detected: want equal elements: %v", v.Slice(start, i))) - } - start = -1 - } else if start == -1 { - start = i - } - } -} -func (ss sliceSorter) less(v reflect.Value, i, j int) bool { - vx, vy := v.Index(i), v.Index(j) - return ss.fnc.Call([]reflect.Value{vx, vy})[0].Bool() -} - -// SortMaps returns a Transformer option that flattens map[K]V types to be a -// sorted []struct{K, V}. The less function must be of the form -// "func(T, T) bool" which is used to sort any map with key K that is -// assignable to T. -// -// Flattening the map into a slice has the property that cmp.Equal is able to -// use Comparers on K or the K.Equal method if it exists. -// -// The less function must be: -// • Deterministic: less(x, y) == less(x, y) -// • Irreflexive: !less(x, x) -// • Transitive: if !less(x, y) and !less(y, z), then !less(x, z) -// • Total: if x != y, then either less(x, y) or less(y, x) -// -// SortMaps can be used in conjuction with EquateEmpty. -func SortMaps(less interface{}) cmp.Option { - vf := reflect.ValueOf(less) - if !function.IsType(vf.Type(), function.Less) || vf.IsNil() { - panic(fmt.Sprintf("invalid less function: %T", less)) - } - ms := mapSorter{vf.Type().In(0), vf} - return cmp.FilterValues(ms.filter, cmp.Transformer("Sort", ms.sort)) -} - -type mapSorter struct { - in reflect.Type // T - fnc reflect.Value // func(T, T) bool -} - -func (ms mapSorter) filter(x, y interface{}) bool { - vx, vy := reflect.ValueOf(x), reflect.ValueOf(y) - return (x != nil && y != nil && vx.Type() == vy.Type()) && - (vx.Kind() == reflect.Map && vx.Type().Key().AssignableTo(ms.in)) && - (vx.Len() != 0 || vy.Len() != 0) -} -func (ms mapSorter) sort(x interface{}) interface{} { - src := reflect.ValueOf(x) - outType := mapEntryType(src.Type()) - dst := reflect.MakeSlice(reflect.SliceOf(outType), src.Len(), src.Len()) - for i, k := range src.MapKeys() { - v := reflect.New(outType).Elem() - v.Field(0).Set(k) - v.Field(1).Set(src.MapIndex(k)) - dst.Index(i).Set(v) - } - sortSlice(dst.Interface(), func(i, j int) bool { return ms.less(dst, i, j) }) - ms.checkSort(dst) - return dst.Interface() -} -func (ms mapSorter) checkSort(v reflect.Value) { - for i := 1; i < v.Len(); i++ { - if !ms.less(v, i-1, i) { - panic(fmt.Sprintf("partial order detected: want %v < %v", v.Index(i-1), v.Index(i))) - } - } -} -func (ms mapSorter) less(v reflect.Value, i, j int) bool { - vx, vy := v.Index(i).Field(0), v.Index(j).Field(0) - if !hasReflectStructOf { - vx, vy = vx.Elem(), vy.Elem() - } - return ms.fnc.Call([]reflect.Value{vx, vy})[0].Bool() -} diff --git a/vendor/github.com/google/go-cmp/cmp/cmpopts/sort_go17.go b/vendor/github.com/google/go-cmp/cmp/cmpopts/sort_go17.go deleted file mode 100644 index 839b88c..0000000 --- a/vendor/github.com/google/go-cmp/cmp/cmpopts/sort_go17.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2017, 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.md file. - -// +build !go1.8 - -package cmpopts - -import ( - "reflect" - "sort" -) - -const hasReflectStructOf = false - -func mapEntryType(reflect.Type) reflect.Type { - return reflect.TypeOf(struct{ K, V interface{} }{}) -} - -func sliceIsSorted(slice interface{}, less func(i, j int) bool) bool { - return sort.IsSorted(reflectSliceSorter{reflect.ValueOf(slice), less}) -} -func sortSlice(slice interface{}, less func(i, j int) bool) { - sort.Sort(reflectSliceSorter{reflect.ValueOf(slice), less}) -} -func sortSliceStable(slice interface{}, less func(i, j int) bool) { - sort.Stable(reflectSliceSorter{reflect.ValueOf(slice), less}) -} - -type reflectSliceSorter struct { - slice reflect.Value - less func(i, j int) bool -} - -func (ss reflectSliceSorter) Len() int { - return ss.slice.Len() -} -func (ss reflectSliceSorter) Less(i, j int) bool { - return ss.less(i, j) -} -func (ss reflectSliceSorter) Swap(i, j int) { - vi := ss.slice.Index(i).Interface() - vj := ss.slice.Index(j).Interface() - ss.slice.Index(i).Set(reflect.ValueOf(vj)) - ss.slice.Index(j).Set(reflect.ValueOf(vi)) -} diff --git a/vendor/github.com/google/go-cmp/cmp/cmpopts/sort_go18.go b/vendor/github.com/google/go-cmp/cmp/cmpopts/sort_go18.go deleted file mode 100644 index 8a59c0d..0000000 --- a/vendor/github.com/google/go-cmp/cmp/cmpopts/sort_go18.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2017, 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.md file. - -// +build go1.8 - -package cmpopts - -import ( - "reflect" - "sort" -) - -const hasReflectStructOf = true - -func mapEntryType(t reflect.Type) reflect.Type { - return reflect.StructOf([]reflect.StructField{ - {Name: "K", Type: t.Key()}, - {Name: "V", Type: t.Elem()}, - }) -} - -func sliceIsSorted(slice interface{}, less func(i, j int) bool) bool { - return sort.SliceIsSorted(slice, less) -} -func sortSlice(slice interface{}, less func(i, j int) bool) { - sort.Slice(slice, less) -} -func sortSliceStable(slice interface{}, less func(i, j int) bool) { - sort.SliceStable(slice, less) -} diff --git a/vendor/github.com/google/go-cmp/cmp/cmpopts/struct_filter.go b/vendor/github.com/google/go-cmp/cmp/cmpopts/struct_filter.go deleted file mode 100644 index 97f7079..0000000 --- a/vendor/github.com/google/go-cmp/cmp/cmpopts/struct_filter.go +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright 2017, 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.md file. - -package cmpopts - -import ( - "fmt" - "reflect" - "strings" - - "github.com/google/go-cmp/cmp" -) - -// filterField returns a new Option where opt is only evaluated on paths that -// include a specific exported field on a single struct type. -// The struct type is specified by passing in a value of that type. -// -// The name may be a dot-delimited string (e.g., "Foo.Bar") to select a -// specific sub-field that is embedded or nested within the parent struct. -func filterField(typ interface{}, name string, opt cmp.Option) cmp.Option { - // TODO: This is currently unexported over concerns of how helper filters - // can be composed together easily. - // TODO: Add tests for FilterField. - - sf := newStructFilter(typ, name) - return cmp.FilterPath(sf.filter, opt) -} - -type structFilter struct { - t reflect.Type // The root struct type to match on - ft fieldTree // Tree of fields to match on -} - -func newStructFilter(typ interface{}, names ...string) structFilter { - // TODO: Perhaps allow * as a special identifier to allow ignoring any - // number of path steps until the next field match? - // This could be useful when a concrete struct gets transformed into - // an anonymous struct where it is not possible to specify that by type, - // but the transformer happens to provide guarantees about the names of - // the transformed fields. - - t := reflect.TypeOf(typ) - if t == nil || t.Kind() != reflect.Struct { - panic(fmt.Sprintf("%T must be a struct", typ)) - } - var ft fieldTree - for _, name := range names { - cname, err := canonicalName(t, name) - if err != nil { - panic(fmt.Sprintf("%s: %v", strings.Join(cname, "."), err)) - } - ft.insert(cname) - } - return structFilter{t, ft} -} - -func (sf structFilter) filter(p cmp.Path) bool { - for i, ps := range p { - if ps.Type().AssignableTo(sf.t) && sf.ft.matchPrefix(p[i+1:]) { - return true - } - } - return false -} - -// fieldTree represents a set of dot-separated identifiers. -// -// For example, inserting the following selectors: -// Foo -// Foo.Bar.Baz -// Foo.Buzz -// Nuka.Cola.Quantum -// -// Results in a tree of the form: -// {sub: { -// "Foo": {ok: true, sub: { -// "Bar": {sub: { -// "Baz": {ok: true}, -// }}, -// "Buzz": {ok: true}, -// }}, -// "Nuka": {sub: { -// "Cola": {sub: { -// "Quantum": {ok: true}, -// }}, -// }}, -// }} -type fieldTree struct { - ok bool // Whether this is a specified node - sub map[string]fieldTree // The sub-tree of fields under this node -} - -// insert inserts a sequence of field accesses into the tree. -func (ft *fieldTree) insert(cname []string) { - if ft.sub == nil { - ft.sub = make(map[string]fieldTree) - } - if len(cname) == 0 { - ft.ok = true - return - } - sub := ft.sub[cname[0]] - sub.insert(cname[1:]) - ft.sub[cname[0]] = sub -} - -// matchPrefix reports whether any selector in the fieldTree matches -// the start of path p. -func (ft fieldTree) matchPrefix(p cmp.Path) bool { - for _, ps := range p { - switch ps := ps.(type) { - case cmp.StructField: - ft = ft.sub[ps.Name()] - if ft.ok { - return true - } - if len(ft.sub) == 0 { - return false - } - case cmp.Indirect: - default: - return false - } - } - return false -} - -// canonicalName returns a list of identifiers where any struct field access -// through an embedded field is expanded to include the names of the embedded -// types themselves. -// -// For example, suppose field "Foo" is not directly in the parent struct, -// but actually from an embedded struct of type "Bar". Then, the canonical name -// of "Foo" is actually "Bar.Foo". -// -// Suppose field "Foo" is not directly in the parent struct, but actually -// a field in two different embedded structs of types "Bar" and "Baz". -// Then the selector "Foo" causes a panic since it is ambiguous which one it -// refers to. The user must specify either "Bar.Foo" or "Baz.Foo". -func canonicalName(t reflect.Type, sel string) ([]string, error) { - var name string - sel = strings.TrimPrefix(sel, ".") - if sel == "" { - return nil, fmt.Errorf("name must not be empty") - } - if i := strings.IndexByte(sel, '.'); i < 0 { - name, sel = sel, "" - } else { - name, sel = sel[:i], sel[i:] - } - - // Type must be a struct or pointer to struct. - if t.Kind() == reflect.Ptr { - t = t.Elem() - } - if t.Kind() != reflect.Struct { - return nil, fmt.Errorf("%v must be a struct", t) - } - - // Find the canonical name for this current field name. - // If the field exists in an embedded struct, then it will be expanded. - if !isExported(name) { - // Disallow unexported fields: - // * To discourage people from actually touching unexported fields - // * FieldByName is buggy (https://golang.org/issue/4876) - return []string{name}, fmt.Errorf("name must be exported") - } - sf, ok := t.FieldByName(name) - if !ok { - return []string{name}, fmt.Errorf("does not exist") - } - var ss []string - for i := range sf.Index { - ss = append(ss, t.FieldByIndex(sf.Index[:i+1]).Name) - } - if sel == "" { - return ss, nil - } - ssPost, err := canonicalName(sf.Type, sel) - return append(ss, ssPost...), err -} diff --git a/vendor/github.com/google/go-cmp/cmp/cmpopts/util_test.go b/vendor/github.com/google/go-cmp/cmp/cmpopts/util_test.go deleted file mode 100644 index f532789..0000000 --- a/vendor/github.com/google/go-cmp/cmp/cmpopts/util_test.go +++ /dev/null @@ -1,996 +0,0 @@ -// Copyright 2017, 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.md file. - -package cmpopts - -import ( - "bytes" - "fmt" - "io" - "math" - "reflect" - "strings" - "sync" - "testing" - "time" - - "github.com/google/go-cmp/cmp" -) - -type ( - MyInt int - MyFloat float32 - MyTime struct{ time.Time } - MyStruct struct { - A, B []int - C, D map[time.Time]string - } - - Foo1 struct{ Alpha, Bravo, Charlie int } - Foo2 struct{ *Foo1 } - Foo3 struct{ *Foo2 } - Bar1 struct{ Foo3 } - Bar2 struct { - Bar1 - *Foo3 - Bravo float32 - } - Bar3 struct { - Bar1 - Bravo *Bar2 - Delta struct{ Echo Foo1 } - *Foo3 - Alpha string - } - - privateStruct struct{ Public, private int } - PublicStruct struct{ Public, private int } - ParentStruct struct { - *privateStruct - *PublicStruct - Public int - private int - } - - Everything struct { - MyInt - MyFloat - MyTime - MyStruct - Bar3 - ParentStruct - } - - EmptyInterface interface{} -) - -func TestOptions(t *testing.T) { - createBar3X := func() *Bar3 { - return &Bar3{ - Bar1: Bar1{Foo3{&Foo2{&Foo1{Bravo: 2}}}}, - Bravo: &Bar2{ - Bar1: Bar1{Foo3{&Foo2{&Foo1{Charlie: 7}}}}, - Foo3: &Foo3{&Foo2{&Foo1{Bravo: 5}}}, - Bravo: 4, - }, - Delta: struct{ Echo Foo1 }{Foo1{Charlie: 3}}, - Foo3: &Foo3{&Foo2{&Foo1{Alpha: 1}}}, - Alpha: "alpha", - } - } - createBar3Y := func() *Bar3 { - return &Bar3{ - Bar1: Bar1{Foo3{&Foo2{&Foo1{Bravo: 3}}}}, - Bravo: &Bar2{ - Bar1: Bar1{Foo3{&Foo2{&Foo1{Charlie: 8}}}}, - Foo3: &Foo3{&Foo2{&Foo1{Bravo: 6}}}, - Bravo: 5, - }, - Delta: struct{ Echo Foo1 }{Foo1{Charlie: 4}}, - Foo3: &Foo3{&Foo2{&Foo1{Alpha: 2}}}, - Alpha: "ALPHA", - } - } - - tests := []struct { - label string // Test name - x, y interface{} // Input values to compare - opts []cmp.Option // Input options - wantEqual bool // Whether the inputs are equal - wantPanic bool // Whether Equal should panic - reason string // The reason for the expected outcome - }{{ - label: "EquateEmpty", - x: []int{}, - y: []int(nil), - wantEqual: false, - reason: "not equal because empty non-nil and nil slice differ", - }, { - label: "EquateEmpty", - x: []int{}, - y: []int(nil), - opts: []cmp.Option{EquateEmpty()}, - wantEqual: true, - reason: "equal because EquateEmpty equates empty slices", - }, { - label: "SortSlices", - x: []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, - y: []int{1, 0, 5, 2, 8, 9, 4, 3, 6, 7}, - wantEqual: false, - reason: "not equal because element order differs", - }, { - label: "SortSlices", - x: []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, - y: []int{1, 0, 5, 2, 8, 9, 4, 3, 6, 7}, - opts: []cmp.Option{SortSlices(func(x, y int) bool { return x < y })}, - wantEqual: true, - reason: "equal because SortSlices sorts the slices", - }, { - label: "SortSlices", - x: []MyInt{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, - y: []MyInt{1, 0, 5, 2, 8, 9, 4, 3, 6, 7}, - opts: []cmp.Option{SortSlices(func(x, y int) bool { return x < y })}, - wantEqual: false, - reason: "not equal because MyInt is not the same type as int", - }, { - label: "SortSlices", - x: []float64{0, 1, 1, 2, 2, 2}, - y: []float64{2, 0, 2, 1, 2, 1}, - opts: []cmp.Option{SortSlices(func(x, y float64) bool { return x < y })}, - wantEqual: true, - reason: "equal even when sorted with duplicate elements", - }, { - label: "SortSlices", - x: []float64{0, 1, 1, 2, 2, 2, math.NaN(), 3, 3, 3, 3, 4, 4, 4, 4}, - y: []float64{2, 0, 4, 4, 3, math.NaN(), 4, 1, 3, 2, 3, 3, 4, 1, 2}, - opts: []cmp.Option{SortSlices(func(x, y float64) bool { return x < y })}, - wantPanic: true, - reason: "panics because SortSlices used with non-transitive less function", - }, { - label: "SortSlices", - x: []float64{0, 1, 1, 2, 2, 2, math.NaN(), 3, 3, 3, 3, 4, 4, 4, 4}, - y: []float64{2, 0, 4, 4, 3, math.NaN(), 4, 1, 3, 2, 3, 3, 4, 1, 2}, - opts: []cmp.Option{SortSlices(func(x, y float64) bool { - return (!math.IsNaN(x) && math.IsNaN(y)) || x < y - })}, - wantEqual: false, - reason: "no panics because SortSlices used with valid less function; not equal because NaN != NaN", - }, { - label: "SortSlices+EquateNaNs", - x: []float64{0, 1, 1, 2, 2, 2, math.NaN(), 3, 3, 3, math.NaN(), 3, 4, 4, 4, 4}, - y: []float64{2, 0, 4, 4, 3, math.NaN(), 4, 1, 3, 2, 3, 3, 4, 1, math.NaN(), 2}, - opts: []cmp.Option{ - EquateNaNs(), - SortSlices(func(x, y float64) bool { - return (!math.IsNaN(x) && math.IsNaN(y)) || x < y - }), - }, - wantEqual: true, - reason: "no panics because SortSlices used with valid less function; equal because EquateNaNs is used", - }, { - label: "SortMaps", - x: map[time.Time]string{ - time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC): "0th birthday", - time.Date(2010, time.November, 10, 23, 0, 0, 0, time.UTC): "1st birthday", - time.Date(2011, time.November, 10, 23, 0, 0, 0, time.UTC): "2nd birthday", - }, - y: map[time.Time]string{ - time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC).In(time.Local): "0th birthday", - time.Date(2010, time.November, 10, 23, 0, 0, 0, time.UTC).In(time.Local): "1st birthday", - time.Date(2011, time.November, 10, 23, 0, 0, 0, time.UTC).In(time.Local): "2nd birthday", - }, - wantEqual: false, - reason: "not equal because timezones differ", - }, { - label: "SortMaps", - x: map[time.Time]string{ - time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC): "0th birthday", - time.Date(2010, time.November, 10, 23, 0, 0, 0, time.UTC): "1st birthday", - time.Date(2011, time.November, 10, 23, 0, 0, 0, time.UTC): "2nd birthday", - }, - y: map[time.Time]string{ - time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC).In(time.Local): "0th birthday", - time.Date(2010, time.November, 10, 23, 0, 0, 0, time.UTC).In(time.Local): "1st birthday", - time.Date(2011, time.November, 10, 23, 0, 0, 0, time.UTC).In(time.Local): "2nd birthday", - }, - opts: []cmp.Option{SortMaps(func(x, y time.Time) bool { return x.Before(y) })}, - wantEqual: true, - reason: "equal because SortMaps flattens to a slice where Time.Equal can be used", - }, { - label: "SortMaps", - x: map[MyTime]string{ - {time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)}: "0th birthday", - {time.Date(2010, time.November, 10, 23, 0, 0, 0, time.UTC)}: "1st birthday", - {time.Date(2011, time.November, 10, 23, 0, 0, 0, time.UTC)}: "2nd birthday", - }, - y: map[MyTime]string{ - {time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC).In(time.Local)}: "0th birthday", - {time.Date(2010, time.November, 10, 23, 0, 0, 0, time.UTC).In(time.Local)}: "1st birthday", - {time.Date(2011, time.November, 10, 23, 0, 0, 0, time.UTC).In(time.Local)}: "2nd birthday", - }, - opts: []cmp.Option{SortMaps(func(x, y time.Time) bool { return x.Before(y) })}, - wantEqual: false, - reason: "not equal because MyTime is not assignable to time.Time", - }, { - label: "SortMaps", - x: map[int]string{-3: "", -2: "", -1: "", 0: "", 1: "", 2: "", 3: ""}, - // => {0, 1, 2, 3, -1, -2, -3}, - y: map[int]string{300: "", 200: "", 100: "", 0: "", 1: "", 2: "", 3: ""}, - // => {0, 1, 2, 3, 100, 200, 300}, - opts: []cmp.Option{SortMaps(func(a, b int) bool { - if -10 < a && a <= 0 { - a *= -100 - } - if -10 < b && b <= 0 { - b *= -100 - } - return a < b - })}, - wantEqual: false, - reason: "not equal because values differ even though SortMap provides valid ordering", - }, { - label: "SortMaps", - x: map[int]string{-3: "", -2: "", -1: "", 0: "", 1: "", 2: "", 3: ""}, - // => {0, 1, 2, 3, -1, -2, -3}, - y: map[int]string{300: "", 200: "", 100: "", 0: "", 1: "", 2: "", 3: ""}, - // => {0, 1, 2, 3, 100, 200, 300}, - opts: []cmp.Option{ - SortMaps(func(x, y int) bool { - if -10 < x && x <= 0 { - x *= -100 - } - if -10 < y && y <= 0 { - y *= -100 - } - return x < y - }), - cmp.Comparer(func(x, y int) bool { - if -10 < x && x <= 0 { - x *= -100 - } - if -10 < y && y <= 0 { - y *= -100 - } - return x == y - }), - }, - wantEqual: true, - reason: "equal because Comparer used to equate differences", - }, { - label: "SortMaps", - x: map[int]string{-3: "", -2: "", -1: "", 0: "", 1: "", 2: "", 3: ""}, - y: map[int]string{}, - opts: []cmp.Option{SortMaps(func(x, y int) bool { - return x < y && x >= 0 && y >= 0 - })}, - wantPanic: true, - reason: "panics because SortMaps used with non-transitive less function", - }, { - label: "SortMaps", - x: map[int]string{-3: "", -2: "", -1: "", 0: "", 1: "", 2: "", 3: ""}, - y: map[int]string{}, - opts: []cmp.Option{SortMaps(func(x, y int) bool { - return math.Abs(float64(x)) < math.Abs(float64(y)) - })}, - wantPanic: true, - reason: "panics because SortMaps used with partial less function", - }, { - label: "EquateEmpty+SortSlices+SortMaps", - x: MyStruct{ - A: []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, - C: map[time.Time]string{ - time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC): "0th birthday", - time.Date(2010, time.November, 10, 23, 0, 0, 0, time.UTC): "1st birthday", - }, - D: map[time.Time]string{}, - }, - y: MyStruct{ - A: []int{1, 0, 5, 2, 8, 9, 4, 3, 6, 7}, - B: []int{}, - C: map[time.Time]string{ - time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC).In(time.Local): "0th birthday", - time.Date(2010, time.November, 10, 23, 0, 0, 0, time.UTC).In(time.Local): "1st birthday", - }, - }, - opts: []cmp.Option{ - EquateEmpty(), - SortSlices(func(x, y int) bool { return x < y }), - SortMaps(func(x, y time.Time) bool { return x.Before(y) }), - }, - wantEqual: true, - reason: "no panics because EquateEmpty should compose with the sort options", - }, { - label: "EquateApprox", - x: 3.09, - y: 3.10, - wantEqual: false, - reason: "not equal because floats do not exactly matches", - }, { - label: "EquateApprox", - x: 3.09, - y: 3.10, - opts: []cmp.Option{EquateApprox(0, 0)}, - wantEqual: false, - reason: "not equal because EquateApprox(0 ,0) is equivalent to using ==", - }, { - label: "EquateApprox", - x: 3.09, - y: 3.10, - opts: []cmp.Option{EquateApprox(0.003, 0.009)}, - wantEqual: false, - reason: "not equal because EquateApprox is too strict", - }, { - label: "EquateApprox", - x: 3.09, - y: 3.10, - opts: []cmp.Option{EquateApprox(0, 0.011)}, - wantEqual: true, - reason: "equal because margin is loose enough to match", - }, { - label: "EquateApprox", - x: 3.09, - y: 3.10, - opts: []cmp.Option{EquateApprox(0.004, 0)}, - wantEqual: true, - reason: "equal because fraction is loose enough to match", - }, { - label: "EquateApprox", - x: 3.09, - y: 3.10, - opts: []cmp.Option{EquateApprox(0.004, 0.011)}, - wantEqual: true, - reason: "equal because both the margin and fraction are loose enough to match", - }, { - label: "EquateApprox", - x: float32(3.09), - y: float64(3.10), - opts: []cmp.Option{EquateApprox(0.004, 0)}, - wantEqual: false, - reason: "not equal because the types differ", - }, { - label: "EquateApprox", - x: float32(3.09), - y: float32(3.10), - opts: []cmp.Option{EquateApprox(0.004, 0)}, - wantEqual: true, - reason: "equal because EquateApprox also applies on float32s", - }, { - label: "EquateApprox", - x: []float64{math.Inf(+1), math.Inf(-1)}, - y: []float64{math.Inf(+1), math.Inf(-1)}, - opts: []cmp.Option{EquateApprox(0, 1)}, - wantEqual: true, - reason: "equal because we fall back on == which matches Inf (EquateApprox does not apply on Inf) ", - }, { - label: "EquateApprox", - x: []float64{math.Inf(+1), -1e100}, - y: []float64{+1e100, math.Inf(-1)}, - opts: []cmp.Option{EquateApprox(0, 1)}, - wantEqual: false, - reason: "not equal because we fall back on == where Inf != 1e100 (EquateApprox does not apply on Inf)", - }, { - label: "EquateApprox", - x: float64(+1e100), - y: float64(-1e100), - opts: []cmp.Option{EquateApprox(math.Inf(+1), 0)}, - wantEqual: true, - reason: "equal because infinite fraction matches everything", - }, { - label: "EquateApprox", - x: float64(+1e100), - y: float64(-1e100), - opts: []cmp.Option{EquateApprox(0, math.Inf(+1))}, - wantEqual: true, - reason: "equal because infinite margin matches everything", - }, { - label: "EquateApprox", - x: math.Pi, - y: math.Pi, - opts: []cmp.Option{EquateApprox(0, 0)}, - wantEqual: true, - reason: "equal because EquateApprox(0, 0) is equivalent to ==", - }, { - label: "EquateApprox", - x: math.Pi, - y: math.Nextafter(math.Pi, math.Inf(+1)), - opts: []cmp.Option{EquateApprox(0, 0)}, - wantEqual: false, - reason: "not equal because EquateApprox(0, 0) is equivalent to ==", - }, { - label: "EquateNaNs", - x: []float64{1.0, math.NaN(), math.E, -0.0, +0.0, math.Inf(+1), math.Inf(-1)}, - y: []float64{1.0, math.NaN(), math.E, -0.0, +0.0, math.Inf(+1), math.Inf(-1)}, - wantEqual: false, - reason: "not equal because NaN != NaN", - }, { - label: "EquateNaNs", - x: []float64{1.0, math.NaN(), math.E, -0.0, +0.0, math.Inf(+1), math.Inf(-1)}, - y: []float64{1.0, math.NaN(), math.E, -0.0, +0.0, math.Inf(+1), math.Inf(-1)}, - opts: []cmp.Option{EquateNaNs()}, - wantEqual: true, - reason: "equal because EquateNaNs allows NaN == NaN", - }, { - label: "EquateNaNs", - x: []float32{1.0, float32(math.NaN()), math.E, -0.0, +0.0}, - y: []float32{1.0, float32(math.NaN()), math.E, -0.0, +0.0}, - opts: []cmp.Option{EquateNaNs()}, - wantEqual: true, - reason: "equal because EquateNaNs operates on float32", - }, { - label: "EquateApprox+EquateNaNs", - x: []float64{1.0, math.NaN(), math.E, -0.0, +0.0, math.Inf(+1), math.Inf(-1), 1.01, 5001}, - y: []float64{1.0, math.NaN(), math.E, -0.0, +0.0, math.Inf(+1), math.Inf(-1), 1.02, 5002}, - opts: []cmp.Option{ - EquateNaNs(), - EquateApprox(0.01, 0), - }, - wantEqual: true, - reason: "equal because EquateNaNs and EquateApprox compose together", - }, { - label: "EquateApprox+EquateNaNs", - x: []MyFloat{1.0, MyFloat(math.NaN()), MyFloat(math.E), -0.0, +0.0, MyFloat(math.Inf(+1)), MyFloat(math.Inf(-1)), 1.01, 5001}, - y: []MyFloat{1.0, MyFloat(math.NaN()), MyFloat(math.E), -0.0, +0.0, MyFloat(math.Inf(+1)), MyFloat(math.Inf(-1)), 1.02, 5002}, - opts: []cmp.Option{ - EquateNaNs(), - EquateApprox(0.01, 0), - }, - wantEqual: false, - reason: "not equal because EquateApprox and EquateNaNs do not apply on a named type", - }, { - label: "EquateApprox+EquateNaNs+Transform", - x: []MyFloat{1.0, MyFloat(math.NaN()), MyFloat(math.E), -0.0, +0.0, MyFloat(math.Inf(+1)), MyFloat(math.Inf(-1)), 1.01, 5001}, - y: []MyFloat{1.0, MyFloat(math.NaN()), MyFloat(math.E), -0.0, +0.0, MyFloat(math.Inf(+1)), MyFloat(math.Inf(-1)), 1.02, 5002}, - opts: []cmp.Option{ - cmp.Transformer("", func(x MyFloat) float64 { return float64(x) }), - EquateNaNs(), - EquateApprox(0.01, 0), - }, - wantEqual: true, - reason: "equal because named type is transformed to float64", - }, { - label: "IgnoreFields", - x: Bar1{Foo3{&Foo2{&Foo1{Alpha: 5}}}}, - y: Bar1{Foo3{&Foo2{&Foo1{Alpha: 6}}}}, - wantEqual: false, - reason: "not equal because values do not match in deeply embedded field", - }, { - label: "IgnoreFields", - x: Bar1{Foo3{&Foo2{&Foo1{Alpha: 5}}}}, - y: Bar1{Foo3{&Foo2{&Foo1{Alpha: 6}}}}, - opts: []cmp.Option{IgnoreFields(Bar1{}, "Alpha")}, - wantEqual: true, - reason: "equal because IgnoreField ignores deeply embedded field: Alpha", - }, { - label: "IgnoreFields", - x: Bar1{Foo3{&Foo2{&Foo1{Alpha: 5}}}}, - y: Bar1{Foo3{&Foo2{&Foo1{Alpha: 6}}}}, - opts: []cmp.Option{IgnoreFields(Bar1{}, "Foo1.Alpha")}, - wantEqual: true, - reason: "equal because IgnoreField ignores deeply embedded field: Foo1.Alpha", - }, { - label: "IgnoreFields", - x: Bar1{Foo3{&Foo2{&Foo1{Alpha: 5}}}}, - y: Bar1{Foo3{&Foo2{&Foo1{Alpha: 6}}}}, - opts: []cmp.Option{IgnoreFields(Bar1{}, "Foo2.Alpha")}, - wantEqual: true, - reason: "equal because IgnoreField ignores deeply embedded field: Foo2.Alpha", - }, { - label: "IgnoreFields", - x: Bar1{Foo3{&Foo2{&Foo1{Alpha: 5}}}}, - y: Bar1{Foo3{&Foo2{&Foo1{Alpha: 6}}}}, - opts: []cmp.Option{IgnoreFields(Bar1{}, "Foo3.Alpha")}, - wantEqual: true, - reason: "equal because IgnoreField ignores deeply embedded field: Foo3.Alpha", - }, { - label: "IgnoreFields", - x: Bar1{Foo3{&Foo2{&Foo1{Alpha: 5}}}}, - y: Bar1{Foo3{&Foo2{&Foo1{Alpha: 6}}}}, - opts: []cmp.Option{IgnoreFields(Bar1{}, "Foo3.Foo2.Alpha")}, - wantEqual: true, - reason: "equal because IgnoreField ignores deeply embedded field: Foo3.Foo2.Alpha", - }, { - label: "IgnoreFields", - x: createBar3X(), - y: createBar3Y(), - wantEqual: false, - reason: "not equal because many deeply nested or embedded fields differ", - }, { - label: "IgnoreFields", - x: createBar3X(), - y: createBar3Y(), - opts: []cmp.Option{IgnoreFields(Bar3{}, "Bar1", "Bravo", "Delta", "Foo3", "Alpha")}, - wantEqual: true, - reason: "equal because IgnoreFields ignores fields at the highest levels", - }, { - label: "IgnoreFields", - x: createBar3X(), - y: createBar3Y(), - opts: []cmp.Option{ - IgnoreFields(Bar3{}, - "Bar1.Foo3.Bravo", - "Bravo.Bar1.Foo3.Foo2.Foo1.Charlie", - "Bravo.Foo3.Foo2.Foo1.Bravo", - "Bravo.Bravo", - "Delta.Echo.Charlie", - "Foo3.Foo2.Foo1.Alpha", - "Alpha", - ), - }, - wantEqual: true, - reason: "equal because IgnoreFields ignores fields using fully-qualified field", - }, { - label: "IgnoreFields", - x: createBar3X(), - y: createBar3Y(), - opts: []cmp.Option{ - IgnoreFields(Bar3{}, - "Bar1.Foo3.Bravo", - "Bravo.Foo3.Foo2.Foo1.Bravo", - "Bravo.Bravo", - "Delta.Echo.Charlie", - "Foo3.Foo2.Foo1.Alpha", - "Alpha", - ), - }, - wantEqual: false, - reason: "not equal because one fully-qualified field is not ignored: Bravo.Bar1.Foo3.Foo2.Foo1.Charlie", - }, { - label: "IgnoreFields", - x: createBar3X(), - y: createBar3Y(), - opts: []cmp.Option{IgnoreFields(Bar3{}, "Bar1", "Bravo", "Delta", "Alpha")}, - wantEqual: false, - reason: "not equal because highest-level field is not ignored: Foo3", - }, { - label: "IgnoreTypes", - x: []interface{}{5, "same"}, - y: []interface{}{6, "same"}, - wantEqual: false, - reason: "not equal because 5 != 6", - }, { - label: "IgnoreTypes", - x: []interface{}{5, "same"}, - y: []interface{}{6, "same"}, - opts: []cmp.Option{IgnoreTypes(0)}, - wantEqual: true, - reason: "equal because ints are ignored", - }, { - label: "IgnoreTypes+IgnoreInterfaces", - x: []interface{}{5, "same", new(bytes.Buffer)}, - y: []interface{}{6, "same", new(bytes.Buffer)}, - opts: []cmp.Option{IgnoreTypes(0)}, - wantPanic: true, - reason: "panics because bytes.Buffer has unexported fields", - }, { - label: "IgnoreTypes+IgnoreInterfaces", - x: []interface{}{5, "same", new(bytes.Buffer)}, - y: []interface{}{6, "diff", new(bytes.Buffer)}, - opts: []cmp.Option{ - IgnoreTypes(0, ""), - IgnoreInterfaces(struct{ io.Reader }{}), - }, - wantEqual: true, - reason: "equal because bytes.Buffer is ignored by match on interface type", - }, { - label: "IgnoreTypes+IgnoreInterfaces", - x: []interface{}{5, "same", new(bytes.Buffer)}, - y: []interface{}{6, "same", new(bytes.Buffer)}, - opts: []cmp.Option{ - IgnoreTypes(0, ""), - IgnoreInterfaces(struct { - io.Reader - io.Writer - fmt.Stringer - }{}), - }, - wantEqual: true, - reason: "equal because bytes.Buffer is ignored by match on multiple interface types", - }, { - label: "IgnoreInterfaces", - x: struct{ mu sync.Mutex }{}, - y: struct{ mu sync.Mutex }{}, - wantPanic: true, - reason: "panics because sync.Mutex has unexported fields", - }, { - label: "IgnoreInterfaces", - x: struct{ mu sync.Mutex }{}, - y: struct{ mu sync.Mutex }{}, - opts: []cmp.Option{IgnoreInterfaces(struct{ sync.Locker }{})}, - wantEqual: true, - reason: "equal because IgnoreInterfaces applies on values (with pointer receiver)", - }, { - label: "IgnoreInterfaces", - x: struct{ mu *sync.Mutex }{}, - y: struct{ mu *sync.Mutex }{}, - opts: []cmp.Option{IgnoreInterfaces(struct{ sync.Locker }{})}, - wantEqual: true, - reason: "equal because IgnoreInterfaces applies on pointers", - }, { - label: "IgnoreUnexported", - x: ParentStruct{Public: 1, private: 2}, - y: ParentStruct{Public: 1, private: -2}, - opts: []cmp.Option{cmp.AllowUnexported(ParentStruct{})}, - wantEqual: false, - reason: "not equal because ParentStruct.private differs with AllowUnexported", - }, { - label: "IgnoreUnexported", - x: ParentStruct{Public: 1, private: 2}, - y: ParentStruct{Public: 1, private: -2}, - opts: []cmp.Option{IgnoreUnexported(ParentStruct{})}, - wantEqual: true, - reason: "equal because IgnoreUnexported ignored ParentStruct.private", - }, { - label: "IgnoreUnexported", - x: ParentStruct{Public: 1, private: 2, PublicStruct: &PublicStruct{Public: 3, private: 4}}, - y: ParentStruct{Public: 1, private: -2, PublicStruct: &PublicStruct{Public: 3, private: 4}}, - opts: []cmp.Option{ - cmp.AllowUnexported(PublicStruct{}), - IgnoreUnexported(ParentStruct{}), - }, - wantEqual: true, - reason: "equal because ParentStruct.private is ignored", - }, { - label: "IgnoreUnexported", - x: ParentStruct{Public: 1, private: 2, PublicStruct: &PublicStruct{Public: 3, private: 4}}, - y: ParentStruct{Public: 1, private: -2, PublicStruct: &PublicStruct{Public: 3, private: -4}}, - opts: []cmp.Option{ - cmp.AllowUnexported(PublicStruct{}), - IgnoreUnexported(ParentStruct{}), - }, - wantEqual: false, - reason: "not equal because ParentStruct.PublicStruct.private differs and not ignored by IgnoreUnexported(ParentStruct{})", - }, { - label: "IgnoreUnexported", - x: ParentStruct{Public: 1, private: 2, PublicStruct: &PublicStruct{Public: 3, private: 4}}, - y: ParentStruct{Public: 1, private: -2, PublicStruct: &PublicStruct{Public: 3, private: -4}}, - opts: []cmp.Option{ - IgnoreUnexported(ParentStruct{}, PublicStruct{}), - }, - wantEqual: true, - reason: "equal because both ParentStruct.PublicStruct and ParentStruct.PublicStruct.private are ignored", - }, { - label: "IgnoreUnexported", - x: ParentStruct{Public: 1, private: 2, privateStruct: &privateStruct{Public: 3, private: 4}}, - y: ParentStruct{Public: 1, private: 2, privateStruct: &privateStruct{Public: -3, private: -4}}, - opts: []cmp.Option{ - cmp.AllowUnexported(privateStruct{}, PublicStruct{}, ParentStruct{}), - }, - wantEqual: false, - reason: "not equal since ParentStruct.privateStruct differs", - }, { - label: "IgnoreUnexported", - x: ParentStruct{Public: 1, private: 2, privateStruct: &privateStruct{Public: 3, private: 4}}, - y: ParentStruct{Public: 1, private: 2, privateStruct: &privateStruct{Public: -3, private: -4}}, - opts: []cmp.Option{ - cmp.AllowUnexported(privateStruct{}, PublicStruct{}), - IgnoreUnexported(ParentStruct{}), - }, - wantEqual: true, - reason: "equal because ParentStruct.privateStruct ignored by IgnoreUnexported(ParentStruct{})", - }, { - label: "IgnoreUnexported", - x: ParentStruct{Public: 1, private: 2, privateStruct: &privateStruct{Public: 3, private: 4}}, - y: ParentStruct{Public: 1, private: 2, privateStruct: &privateStruct{Public: 3, private: -4}}, - opts: []cmp.Option{ - cmp.AllowUnexported(PublicStruct{}, ParentStruct{}), - IgnoreUnexported(privateStruct{}), - }, - wantEqual: true, - reason: "equal because privateStruct.private ignored by IgnoreUnexported(privateStruct{})", - }, { - label: "IgnoreUnexported", - x: ParentStruct{Public: 1, private: 2, privateStruct: &privateStruct{Public: 3, private: 4}}, - y: ParentStruct{Public: 1, private: 2, privateStruct: &privateStruct{Public: -3, private: -4}}, - opts: []cmp.Option{ - cmp.AllowUnexported(PublicStruct{}, ParentStruct{}), - IgnoreUnexported(privateStruct{}), - }, - wantEqual: false, - reason: "not equal because privateStruct.Public differs and not ignored by IgnoreUnexported(privateStruct{})", - }, { - label: "IgnoreFields+IgnoreTypes+IgnoreUnexported", - x: &Everything{ - MyInt: 5, - MyFloat: 3.3, - MyTime: MyTime{time.Now()}, - Bar3: *createBar3X(), - ParentStruct: ParentStruct{ - Public: 1, private: 2, PublicStruct: &PublicStruct{Public: 3, private: 4}, - }, - }, - y: &Everything{ - MyInt: -5, - MyFloat: 3.3, - MyTime: MyTime{time.Now()}, - Bar3: *createBar3Y(), - ParentStruct: ParentStruct{ - Public: 1, private: -2, PublicStruct: &PublicStruct{Public: -3, private: -4}, - }, - }, - opts: []cmp.Option{ - IgnoreFields(Everything{}, "MyTime", "Bar3.Foo3"), - IgnoreFields(Bar3{}, "Bar1", "Bravo", "Delta", "Alpha"), - IgnoreTypes(MyInt(0), PublicStruct{}), - IgnoreUnexported(ParentStruct{}), - }, - wantEqual: true, - reason: "equal because all Ignore options can be composed together", - }} - - for _, tt := range tests { - tRun(t, tt.label, func(t *testing.T) { - var gotEqual bool - var gotPanic string - func() { - defer func() { - if ex := recover(); ex != nil { - gotPanic = fmt.Sprint(ex) - } - }() - gotEqual = cmp.Equal(tt.x, tt.y, tt.opts...) - }() - switch { - case gotPanic == "" && tt.wantPanic: - t.Errorf("expected Equal panic\nreason: %s", tt.reason) - case gotPanic != "" && !tt.wantPanic: - t.Errorf("unexpected Equal panic: got %v\nreason: %v", gotPanic, tt.reason) - case gotEqual != tt.wantEqual: - t.Errorf("Equal = %v, want %v\nreason: %v", gotEqual, tt.wantEqual, tt.reason) - } - }) - } -} - -func TestPanic(t *testing.T) { - args := func(x ...interface{}) []interface{} { return x } - tests := []struct { - label string // Test name - fnc interface{} // Option function to call - args []interface{} // Arguments to pass in - wantPanic string // Expected panic message - reason string // The reason for the expected outcome - }{{ - label: "EquateApprox", - fnc: EquateApprox, - args: args(0.0, 0.0), - reason: "zero margin and fraction is equivalent to exact equality", - }, { - label: "EquateApprox", - fnc: EquateApprox, - args: args(-0.1, 0.0), - wantPanic: "margin or fraction must be a non-negative number", - reason: "negative inputs are invalid", - }, { - label: "EquateApprox", - fnc: EquateApprox, - args: args(0.0, -0.1), - wantPanic: "margin or fraction must be a non-negative number", - reason: "negative inputs are invalid", - }, { - label: "EquateApprox", - fnc: EquateApprox, - args: args(math.NaN(), 0.0), - wantPanic: "margin or fraction must be a non-negative number", - reason: "NaN inputs are invalid", - }, { - label: "EquateApprox", - fnc: EquateApprox, - args: args(1.0, 0.0), - reason: "fraction of 1.0 or greater is valid", - }, { - label: "EquateApprox", - fnc: EquateApprox, - args: args(0.0, math.Inf(+1)), - reason: "margin of infinity is valid", - }, { - label: "SortSlices", - fnc: SortSlices, - args: args(strings.Compare), - wantPanic: "invalid less function", - reason: "func(x, y string) int is wrong signature for less", - }, { - label: "SortSlices", - fnc: SortSlices, - args: args((func(_, _ int) bool)(nil)), - wantPanic: "invalid less function", - reason: "nil value is not valid", - }, { - label: "SortMaps", - fnc: SortMaps, - args: args(strings.Compare), - wantPanic: "invalid less function", - reason: "func(x, y string) int is wrong signature for less", - }, { - label: "SortMaps", - fnc: SortMaps, - args: args((func(_, _ int) bool)(nil)), - wantPanic: "invalid less function", - reason: "nil value is not valid", - }, { - label: "IgnoreFields", - fnc: IgnoreFields, - args: args(Foo1{}, ""), - wantPanic: "name must not be empty", - reason: "empty selector is invalid", - }, { - label: "IgnoreFields", - fnc: IgnoreFields, - args: args(Foo1{}, "."), - wantPanic: "name must not be empty", - reason: "single dot selector is invalid", - }, { - label: "IgnoreFields", - fnc: IgnoreFields, - args: args(Foo1{}, ".Alpha"), - reason: "dot-prefix is okay since Foo1.Alpha reads naturally", - }, { - label: "IgnoreFields", - fnc: IgnoreFields, - args: args(Foo1{}, "Alpha."), - wantPanic: "name must not be empty", - reason: "dot-suffix is invalid", - }, { - label: "IgnoreFields", - fnc: IgnoreFields, - args: args(Foo1{}, "Alpha "), - wantPanic: "does not exist", - reason: "identifiers must not have spaces", - }, { - label: "IgnoreFields", - fnc: IgnoreFields, - args: args(Foo1{}, "Zulu"), - wantPanic: "does not exist", - reason: "name of non-existent field is invalid", - }, { - label: "IgnoreFields", - fnc: IgnoreFields, - args: args(Foo1{}, "Alpha.NoExist"), - wantPanic: "must be a struct", - reason: "cannot select into a non-struct", - }, { - label: "IgnoreFields", - fnc: IgnoreFields, - args: args(&Foo1{}, "Alpha"), - wantPanic: "must be a struct", - reason: "the type must be a struct (not pointer to a struct)", - }, { - label: "IgnoreFields", - fnc: IgnoreFields, - args: args(Foo1{}, "unexported"), - wantPanic: "name must be exported", - reason: "unexported fields must not be specified", - }, { - label: "IgnoreTypes", - fnc: IgnoreTypes, - reason: "empty input is valid", - }, { - label: "IgnoreTypes", - fnc: IgnoreTypes, - args: args(nil), - wantPanic: "cannot determine type", - reason: "input must not be nil value", - }, { - label: "IgnoreTypes", - fnc: IgnoreTypes, - args: args(0, 0, 0), - reason: "duplicate inputs of the same type is valid", - }, { - label: "IgnoreInterfaces", - fnc: IgnoreInterfaces, - args: args(nil), - wantPanic: "input must be an anonymous struct", - reason: "input must not be nil value", - }, { - label: "IgnoreInterfaces", - fnc: IgnoreInterfaces, - args: args(Foo1{}), - wantPanic: "input must be an anonymous struct", - reason: "input must not be a named struct type", - }, { - label: "IgnoreInterfaces", - fnc: IgnoreInterfaces, - args: args(struct{ _ io.Reader }{}), - wantPanic: "struct cannot have named fields", - reason: "input must not have named fields", - }, { - label: "IgnoreInterfaces", - fnc: IgnoreInterfaces, - args: args(struct{ Foo1 }{}), - wantPanic: "embedded field must be an interface type", - reason: "field types must be interfaces", - }, { - label: "IgnoreInterfaces", - fnc: IgnoreInterfaces, - args: args(struct{ EmptyInterface }{}), - wantPanic: "cannot ignore empty interface", - reason: "field types must not be the empty interface", - }, { - label: "IgnoreInterfaces", - fnc: IgnoreInterfaces, - args: args(struct { - io.Reader - io.Writer - io.Closer - io.ReadWriteCloser - }{}), - reason: "multiple interfaces may be specified, even if they overlap", - }, { - label: "IgnoreUnexported", - fnc: IgnoreUnexported, - reason: "empty input is valid", - }, { - label: "IgnoreUnexported", - fnc: IgnoreUnexported, - args: args(nil), - wantPanic: "invalid struct type", - reason: "input must not be nil value", - }, { - label: "IgnoreUnexported", - fnc: IgnoreUnexported, - args: args(&Foo1{}), - wantPanic: "invalid struct type", - reason: "input must be a struct type (not a pointer to a struct)", - }, { - label: "IgnoreUnexported", - fnc: IgnoreUnexported, - args: args(Foo1{}, struct{ x, X int }{}), - reason: "input may be named or unnamed structs", - }} - - for _, tt := range tests { - tRun(t, tt.label, func(t *testing.T) { - // Prepare function arguments. - vf := reflect.ValueOf(tt.fnc) - var vargs []reflect.Value - for i, arg := range tt.args { - if arg == nil { - tf := vf.Type() - if i == tf.NumIn()-1 && tf.IsVariadic() { - vargs = append(vargs, reflect.Zero(tf.In(i).Elem())) - } else { - vargs = append(vargs, reflect.Zero(tf.In(i))) - } - } else { - vargs = append(vargs, reflect.ValueOf(arg)) - } - } - - // Call the function and capture any panics. - var gotPanic string - func() { - defer func() { - if ex := recover(); ex != nil { - if s, ok := ex.(string); ok { - gotPanic = s - } else { - panic(ex) - } - } - }() - vf.Call(vargs) - }() - - switch { - case tt.wantPanic == "" && gotPanic != "": - t.Errorf("unexpected panic message: %s\nreason: %s", gotPanic, tt.reason) - case tt.wantPanic != "" && !strings.Contains(gotPanic, tt.wantPanic): - t.Errorf("panic message:\ngot: %s\nwant: %s\nreason: %s", gotPanic, tt.wantPanic, tt.reason) - } - }) - } -} - -// TODO: Delete this hack when we drop Go1.6 support. -func tRun(t *testing.T, name string, f func(t *testing.T)) { - type runner interface { - Run(string, func(t *testing.T)) bool - } - var ti interface{} = t - if r, ok := ti.(runner); ok { - r.Run(name, f) - } else { - t.Logf("Test: %s", name) - f(t) - } -} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/testprotos/protos.go b/vendor/github.com/google/go-cmp/cmp/internal/testprotos/protos.go deleted file mode 100644 index 120c8b0..0000000 --- a/vendor/github.com/google/go-cmp/cmp/internal/testprotos/protos.go +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2017, 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.md file. - -package testprotos - -func Equal(x, y Message) bool { - if x == nil || y == nil { - return x == nil && y == nil - } - return x.String() == y.String() -} - -type Message interface { - Proto() - String() string -} - -type proto interface { - Proto() -} - -type notComparable struct { - unexportedField func() -} - -type Stringer struct{ X string } - -func (s *Stringer) String() string { return s.X } - -// Project1 protocol buffers -type ( - Eagle_States int - Eagle_MissingCalls int - Dreamer_States int - Dreamer_MissingCalls int - Slap_States int - Goat_States int - Donkey_States int - SummerType int - - Eagle struct { - proto - notComparable - Stringer - } - Dreamer struct { - proto - notComparable - Stringer - } - Slap struct { - proto - notComparable - Stringer - } - Goat struct { - proto - notComparable - Stringer - } - Donkey struct { - proto - notComparable - Stringer - } -) - -// Project2 protocol buffers -type ( - Germ struct { - proto - notComparable - Stringer - } - Dish struct { - proto - notComparable - Stringer - } -) - -// Project3 protocol buffers -type ( - Dirt struct { - proto - notComparable - Stringer - } - Wizard struct { - proto - notComparable - Stringer - } - Sadistic struct { - proto - notComparable - Stringer - } -) - -// Project4 protocol buffers -type ( - HoneyStatus int - PoisonType int - MetaData struct { - proto - notComparable - Stringer - } - Restrictions struct { - proto - notComparable - Stringer - } -) diff --git a/vendor/github.com/google/go-cmp/cmp/internal/teststructs/project1.go b/vendor/github.com/google/go-cmp/cmp/internal/teststructs/project1.go deleted file mode 100644 index 1999e38..0000000 --- a/vendor/github.com/google/go-cmp/cmp/internal/teststructs/project1.go +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright 2017, 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.md file. - -package teststructs - -import ( - "time" - - pb "github.com/google/go-cmp/cmp/internal/testprotos" -) - -// This is an sanitized example of equality from a real use-case. -// The original equality function was as follows: -/* -func equalEagle(x, y Eagle) bool { - if x.Name != y.Name && - !reflect.DeepEqual(x.Hounds, y.Hounds) && - x.Desc != y.Desc && - x.DescLong != y.DescLong && - x.Prong != y.Prong && - x.StateGoverner != y.StateGoverner && - x.PrankRating != y.PrankRating && - x.FunnyPrank != y.FunnyPrank && - !pb.Equal(x.Immutable.Proto(), y.Immutable.Proto()) { - return false - } - - if len(x.Dreamers) != len(y.Dreamers) { - return false - } - for i := range x.Dreamers { - if !equalDreamer(x.Dreamers[i], y.Dreamers[i]) { - return false - } - } - if len(x.Slaps) != len(y.Slaps) { - return false - } - for i := range x.Slaps { - if !equalSlap(x.Slaps[i], y.Slaps[i]) { - return false - } - } - return true -} -func equalDreamer(x, y Dreamer) bool { - if x.Name != y.Name || - x.Desc != y.Desc || - x.DescLong != y.DescLong || - x.ContSlapsInterval != y.ContSlapsInterval || - x.Ornamental != y.Ornamental || - x.Amoeba != y.Amoeba || - x.Heroes != y.Heroes || - x.FloppyDisk != y.FloppyDisk || - x.MightiestDuck != y.MightiestDuck || - x.FunnyPrank != y.FunnyPrank || - !pb.Equal(x.Immutable.Proto(), y.Immutable.Proto()) { - - return false - } - if len(x.Animal) != len(y.Animal) { - return false - } - for i := range x.Animal { - vx := x.Animal[i] - vy := y.Animal[i] - if reflect.TypeOf(x.Animal) != reflect.TypeOf(y.Animal) { - return false - } - switch vx.(type) { - case Goat: - if !equalGoat(vx.(Goat), vy.(Goat)) { - return false - } - case Donkey: - if !equalDonkey(vx.(Donkey), vy.(Donkey)) { - return false - } - default: - panic(fmt.Sprintf("unknown type: %T", vx)) - } - } - if len(x.PreSlaps) != len(y.PreSlaps) { - return false - } - for i := range x.PreSlaps { - if !equalSlap(x.PreSlaps[i], y.PreSlaps[i]) { - return false - } - } - if len(x.ContSlaps) != len(y.ContSlaps) { - return false - } - for i := range x.ContSlaps { - if !equalSlap(x.ContSlaps[i], y.ContSlaps[i]) { - return false - } - } - return true -} -func equalSlap(x, y Slap) bool { - return x.Name == y.Name && - x.Desc == y.Desc && - x.DescLong == y.DescLong && - pb.Equal(x.Args, y.Args) && - x.Tense == y.Tense && - x.Interval == y.Interval && - x.Homeland == y.Homeland && - x.FunnyPrank == y.FunnyPrank && - pb.Equal(x.Immutable.Proto(), y.Immutable.Proto()) -} -func equalGoat(x, y Goat) bool { - if x.Target != y.Target || - x.FunnyPrank != y.FunnyPrank || - !pb.Equal(x.Immutable.Proto(), y.Immutable.Proto()) { - return false - } - if len(x.Slaps) != len(y.Slaps) { - return false - } - for i := range x.Slaps { - if !equalSlap(x.Slaps[i], y.Slaps[i]) { - return false - } - } - return true -} -func equalDonkey(x, y Donkey) bool { - return x.Pause == y.Pause && - x.Sleep == y.Sleep && - x.FunnyPrank == y.FunnyPrank && - pb.Equal(x.Immutable.Proto(), y.Immutable.Proto()) -} -*/ - -type Eagle struct { - Name string - Hounds []string - Desc string - DescLong string - Dreamers []Dreamer - Prong int64 - Slaps []Slap - StateGoverner string - PrankRating string - FunnyPrank string - Immutable *EagleImmutable -} - -type EagleImmutable struct { - ID string - State *pb.Eagle_States - MissingCall *pb.Eagle_MissingCalls - Birthday time.Time - Death time.Time - Started time.Time - LastUpdate time.Time - Creator string - empty bool -} - -type Dreamer struct { - Name string - Desc string - DescLong string - PreSlaps []Slap - ContSlaps []Slap - ContSlapsInterval int32 - Animal []interface{} // Could be either Goat or Donkey - Ornamental bool - Amoeba int64 - Heroes int32 - FloppyDisk int32 - MightiestDuck bool - FunnyPrank string - Immutable *DreamerImmutable -} - -type DreamerImmutable struct { - ID string - State *pb.Dreamer_States - MissingCall *pb.Dreamer_MissingCalls - Calls int32 - Started time.Time - Stopped time.Time - LastUpdate time.Time - empty bool -} - -type Slap struct { - Name string - Desc string - DescLong string - Args pb.Message - Tense int32 - Interval int32 - Homeland uint32 - FunnyPrank string - Immutable *SlapImmutable -} - -type SlapImmutable struct { - ID string - Out pb.Message - MildSlap bool - PrettyPrint string - State *pb.Slap_States - Started time.Time - Stopped time.Time - LastUpdate time.Time - LoveRadius *LoveRadius - empty bool -} - -type Goat struct { - Target string - Slaps []Slap - FunnyPrank string - Immutable *GoatImmutable -} - -type GoatImmutable struct { - ID string - State *pb.Goat_States - Started time.Time - Stopped time.Time - LastUpdate time.Time - empty bool -} -type Donkey struct { - Pause bool - Sleep int32 - FunnyPrank string - Immutable *DonkeyImmutable -} - -type DonkeyImmutable struct { - ID string - State *pb.Donkey_States - Started time.Time - Stopped time.Time - LastUpdate time.Time - empty bool -} - -type LoveRadius struct { - Summer *SummerLove - empty bool -} - -type SummerLove struct { - Summary *SummerLoveSummary - empty bool -} - -type SummerLoveSummary struct { - Devices []string - ChangeType []pb.SummerType - empty bool -} - -func (EagleImmutable) Proto() *pb.Eagle { return nil } -func (DreamerImmutable) Proto() *pb.Dreamer { return nil } -func (SlapImmutable) Proto() *pb.Slap { return nil } -func (GoatImmutable) Proto() *pb.Goat { return nil } -func (DonkeyImmutable) Proto() *pb.Donkey { return nil } diff --git a/vendor/github.com/google/go-cmp/cmp/internal/teststructs/project2.go b/vendor/github.com/google/go-cmp/cmp/internal/teststructs/project2.go deleted file mode 100644 index 536592b..0000000 --- a/vendor/github.com/google/go-cmp/cmp/internal/teststructs/project2.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2017, 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.md file. - -package teststructs - -import ( - "time" - - pb "github.com/google/go-cmp/cmp/internal/testprotos" -) - -// This is an sanitized example of equality from a real use-case. -// The original equality function was as follows: -/* -func equalBatch(b1, b2 *GermBatch) bool { - for _, b := range []*GermBatch{b1, b2} { - for _, l := range b.DirtyGerms { - sort.Slice(l, func(i, j int) bool { return l[i].String() < l[j].String() }) - } - for _, l := range b.CleanGerms { - sort.Slice(l, func(i, j int) bool { return l[i].String() < l[j].String() }) - } - } - if !pb.DeepEqual(b1.DirtyGerms, b2.DirtyGerms) || - !pb.DeepEqual(b1.CleanGerms, b2.CleanGerms) || - !pb.DeepEqual(b1.GermMap, b2.GermMap) { - return false - } - if len(b1.DishMap) != len(b2.DishMap) { - return false - } - for id := range b1.DishMap { - kpb1, err1 := b1.DishMap[id].Proto() - kpb2, err2 := b2.DishMap[id].Proto() - if !pb.Equal(kpb1, kpb2) || !reflect.DeepEqual(err1, err2) { - return false - } - } - return b1.HasPreviousResult == b2.HasPreviousResult && - b1.DirtyID == b2.DirtyID && - b1.CleanID == b2.CleanID && - b1.GermStrain == b2.GermStrain && - b1.TotalDirtyGerms == b2.TotalDirtyGerms && - b1.InfectedAt.Equal(b2.InfectedAt) -} -*/ - -type GermBatch struct { - DirtyGerms, CleanGerms map[int32][]*pb.Germ - GermMap map[int32]*pb.Germ - DishMap map[int32]*Dish - HasPreviousResult bool - DirtyID, CleanID int32 - GermStrain int32 - TotalDirtyGerms int - InfectedAt time.Time -} - -type Dish struct { - pb *pb.Dish - err error -} - -func CreateDish(m *pb.Dish, err error) *Dish { - return &Dish{pb: m, err: err} -} - -func (d *Dish) Proto() (*pb.Dish, error) { - if d.err != nil { - return nil, d.err - } - return d.pb, nil -} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/teststructs/project3.go b/vendor/github.com/google/go-cmp/cmp/internal/teststructs/project3.go deleted file mode 100644 index 00c252e..0000000 --- a/vendor/github.com/google/go-cmp/cmp/internal/teststructs/project3.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2017, 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.md file. - -package teststructs - -import ( - "sync" - - pb "github.com/google/go-cmp/cmp/internal/testprotos" -) - -// This is an sanitized example of equality from a real use-case. -// The original equality function was as follows: -/* -func equalDirt(x, y *Dirt) bool { - if !reflect.DeepEqual(x.table, y.table) || - !reflect.DeepEqual(x.ts, y.ts) || - x.Discord != y.Discord || - !pb.Equal(&x.Proto, &y.Proto) || - len(x.wizard) != len(y.wizard) || - len(x.sadistic) != len(y.sadistic) || - x.lastTime != y.lastTime { - return false - } - for k, vx := range x.wizard { - vy, ok := y.wizard[k] - if !ok || !pb.Equal(vx, vy) { - return false - } - } - for k, vx := range x.sadistic { - vy, ok := y.sadistic[k] - if !ok || !pb.Equal(vx, vy) { - return false - } - } - return true -} -*/ - -type Dirt struct { - table Table // Always concrete type of MockTable - ts Timestamp - Discord DiscordState - Proto pb.Dirt - wizard map[string]*pb.Wizard - sadistic map[string]*pb.Sadistic - lastTime int64 - mu sync.Mutex -} - -type DiscordState int - -type Timestamp int64 - -func (d *Dirt) SetTable(t Table) { d.table = t } -func (d *Dirt) SetTimestamp(t Timestamp) { d.ts = t } -func (d *Dirt) SetWizard(m map[string]*pb.Wizard) { d.wizard = m } -func (d *Dirt) SetSadistic(m map[string]*pb.Sadistic) { d.sadistic = m } -func (d *Dirt) SetLastTime(t int64) { d.lastTime = t } - -type Table interface { - Operation1() error - Operation2() error - Operation3() error -} - -type MockTable struct { - state []string -} - -func CreateMockTable(s []string) *MockTable { return &MockTable{s} } -func (mt *MockTable) Operation1() error { return nil } -func (mt *MockTable) Operation2() error { return nil } -func (mt *MockTable) Operation3() error { return nil } -func (mt *MockTable) State() []string { return mt.state } diff --git a/vendor/github.com/google/go-cmp/cmp/internal/teststructs/project4.go b/vendor/github.com/google/go-cmp/cmp/internal/teststructs/project4.go deleted file mode 100644 index 9b50d73..0000000 --- a/vendor/github.com/google/go-cmp/cmp/internal/teststructs/project4.go +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright 2017, 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.md file. - -package teststructs - -import ( - "time" - - pb "github.com/google/go-cmp/cmp/internal/testprotos" -) - -// This is an sanitized example of equality from a real use-case. -// The original equality function was as follows: -/* -func equalCartel(x, y Cartel) bool { - if !(equalHeadquarter(x.Headquarter, y.Headquarter) && - x.Source() == y.Source() && - x.CreationDate().Equal(y.CreationDate()) && - x.Boss() == y.Boss() && - x.LastCrimeDate().Equal(y.LastCrimeDate())) { - return false - } - if len(x.Poisons()) != len(y.Poisons()) { - return false - } - for i := range x.Poisons() { - if !equalPoison(*x.Poisons()[i], *y.Poisons()[i]) { - return false - } - } - return true -} -func equalHeadquarter(x, y Headquarter) bool { - xr, yr := x.Restrictions(), y.Restrictions() - return x.ID() == y.ID() && - x.Location() == y.Location() && - reflect.DeepEqual(x.SubDivisions(), y.SubDivisions()) && - x.IncorporatedDate().Equal(y.IncorporatedDate()) && - pb.Equal(x.MetaData(), y.MetaData()) && - bytes.Equal(x.PrivateMessage(), y.PrivateMessage()) && - bytes.Equal(x.PublicMessage(), y.PublicMessage()) && - x.HorseBack() == y.HorseBack() && - x.Rattle() == y.Rattle() && - x.Convulsion() == y.Convulsion() && - x.Expansion() == y.Expansion() && - x.Status() == y.Status() && - pb.Equal(&xr, &yr) && - x.CreationTime().Equal(y.CreationTime()) -} -func equalPoison(x, y Poison) bool { - return x.PoisonType() == y.PoisonType() && - x.Expiration().Equal(y.Expiration()) && - x.Manufactuer() == y.Manufactuer() && - x.Potency() == y.Potency() -} -*/ - -type Cartel struct { - Headquarter - source string - creationDate time.Time - boss string - lastCrimeDate time.Time - poisons []*Poison -} - -func (p Cartel) Source() string { return p.source } -func (p Cartel) CreationDate() time.Time { return p.creationDate } -func (p Cartel) Boss() string { return p.boss } -func (p Cartel) LastCrimeDate() time.Time { return p.lastCrimeDate } -func (p Cartel) Poisons() []*Poison { return p.poisons } - -func (p *Cartel) SetSource(x string) { p.source = x } -func (p *Cartel) SetCreationDate(x time.Time) { p.creationDate = x } -func (p *Cartel) SetBoss(x string) { p.boss = x } -func (p *Cartel) SetLastCrimeDate(x time.Time) { p.lastCrimeDate = x } -func (p *Cartel) SetPoisons(x []*Poison) { p.poisons = x } - -type Headquarter struct { - id uint64 - location string - subDivisions []string - incorporatedDate time.Time - metaData *pb.MetaData - privateMessage []byte - publicMessage []byte - horseBack string - rattle string - convulsion bool - expansion uint64 - status pb.HoneyStatus - restrictions pb.Restrictions - creationTime time.Time -} - -func (hq Headquarter) ID() uint64 { return hq.id } -func (hq Headquarter) Location() string { return hq.location } -func (hq Headquarter) SubDivisions() []string { return hq.subDivisions } -func (hq Headquarter) IncorporatedDate() time.Time { return hq.incorporatedDate } -func (hq Headquarter) MetaData() *pb.MetaData { return hq.metaData } -func (hq Headquarter) PrivateMessage() []byte { return hq.privateMessage } -func (hq Headquarter) PublicMessage() []byte { return hq.publicMessage } -func (hq Headquarter) HorseBack() string { return hq.horseBack } -func (hq Headquarter) Rattle() string { return hq.rattle } -func (hq Headquarter) Convulsion() bool { return hq.convulsion } -func (hq Headquarter) Expansion() uint64 { return hq.expansion } -func (hq Headquarter) Status() pb.HoneyStatus { return hq.status } -func (hq Headquarter) Restrictions() pb.Restrictions { return hq.restrictions } -func (hq Headquarter) CreationTime() time.Time { return hq.creationTime } - -func (hq *Headquarter) SetID(x uint64) { hq.id = x } -func (hq *Headquarter) SetLocation(x string) { hq.location = x } -func (hq *Headquarter) SetSubDivisions(x []string) { hq.subDivisions = x } -func (hq *Headquarter) SetIncorporatedDate(x time.Time) { hq.incorporatedDate = x } -func (hq *Headquarter) SetMetaData(x *pb.MetaData) { hq.metaData = x } -func (hq *Headquarter) SetPrivateMessage(x []byte) { hq.privateMessage = x } -func (hq *Headquarter) SetPublicMessage(x []byte) { hq.publicMessage = x } -func (hq *Headquarter) SetHorseBack(x string) { hq.horseBack = x } -func (hq *Headquarter) SetRattle(x string) { hq.rattle = x } -func (hq *Headquarter) SetConvulsion(x bool) { hq.convulsion = x } -func (hq *Headquarter) SetExpansion(x uint64) { hq.expansion = x } -func (hq *Headquarter) SetStatus(x pb.HoneyStatus) { hq.status = x } -func (hq *Headquarter) SetRestrictions(x pb.Restrictions) { hq.restrictions = x } -func (hq *Headquarter) SetCreationTime(x time.Time) { hq.creationTime = x } - -type Poison struct { - poisonType pb.PoisonType - expiration time.Time - manufactuer string - potency int -} - -func (p Poison) PoisonType() pb.PoisonType { return p.poisonType } -func (p Poison) Expiration() time.Time { return p.expiration } -func (p Poison) Manufactuer() string { return p.manufactuer } -func (p Poison) Potency() int { return p.potency } - -func (p *Poison) SetPoisonType(x pb.PoisonType) { p.poisonType = x } -func (p *Poison) SetExpiration(x time.Time) { p.expiration = x } -func (p *Poison) SetManufactuer(x string) { p.manufactuer = x } -func (p *Poison) SetPotency(x int) { p.potency = x } diff --git a/vendor/github.com/google/go-cmp/cmp/internal/teststructs/structs.go b/vendor/github.com/google/go-cmp/cmp/internal/teststructs/structs.go deleted file mode 100644 index 6b4d2a7..0000000 --- a/vendor/github.com/google/go-cmp/cmp/internal/teststructs/structs.go +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright 2017, 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.md file. - -package teststructs - -type InterfaceA interface { - InterfaceA() -} - -type ( - StructA struct{ X string } // Equal method on value receiver - StructB struct{ X string } // Equal method on pointer receiver - StructC struct{ X string } // Equal method (with interface argument) on value receiver - StructD struct{ X string } // Equal method (with interface argument) on pointer receiver - StructE struct{ X string } // Equal method (with interface argument on value receiver) on pointer receiver - StructF struct{ X string } // Equal method (with interface argument on pointer receiver) on value receiver - - // These embed the above types as a value. - StructA1 struct { - StructA - X string - } - StructB1 struct { - StructB - X string - } - StructC1 struct { - StructC - X string - } - StructD1 struct { - StructD - X string - } - StructE1 struct { - StructE - X string - } - StructF1 struct { - StructF - X string - } - - // These embed the above types as a pointer. - StructA2 struct { - *StructA - X string - } - StructB2 struct { - *StructB - X string - } - StructC2 struct { - *StructC - X string - } - StructD2 struct { - *StructD - X string - } - StructE2 struct { - *StructE - X string - } - StructF2 struct { - *StructF - X string - } - - StructNo struct{ X string } // Equal method (with interface argument) on non-satisfying receiver - - AssignA func() int - AssignB struct{ A int } - AssignC chan bool - AssignD <-chan bool -) - -func (x StructA) Equal(y StructA) bool { return true } -func (x *StructB) Equal(y *StructB) bool { return true } -func (x StructC) Equal(y InterfaceA) bool { return true } -func (x StructC) InterfaceA() {} -func (x *StructD) Equal(y InterfaceA) bool { return true } -func (x *StructD) InterfaceA() {} -func (x *StructE) Equal(y InterfaceA) bool { return true } -func (x StructE) InterfaceA() {} -func (x StructF) Equal(y InterfaceA) bool { return true } -func (x *StructF) InterfaceA() {} -func (x StructNo) Equal(y InterfaceA) bool { return true } - -func (x AssignA) Equal(y func() int) bool { return true } -func (x AssignB) Equal(y struct{ A int }) bool { return true } -func (x AssignC) Equal(y chan bool) bool { return true } -func (x AssignD) Equal(y <-chan bool) bool { return true } - -var _ = func( - a StructA, b StructB, c StructC, d StructD, e StructE, f StructF, - ap *StructA, bp *StructB, cp *StructC, dp *StructD, ep *StructE, fp *StructF, - a1 StructA1, b1 StructB1, c1 StructC1, d1 StructD1, e1 StructE1, f1 StructF1, - a2 StructA2, b2 StructB2, c2 StructC2, d2 StructD2, e2 StructE2, f2 StructF1, -) { - a.Equal(a) - b.Equal(&b) - c.Equal(c) - d.Equal(&d) - e.Equal(e) - f.Equal(&f) - - ap.Equal(*ap) - bp.Equal(bp) - cp.Equal(*cp) - dp.Equal(dp) - ep.Equal(*ep) - fp.Equal(fp) - - a1.Equal(a1.StructA) - b1.Equal(&b1.StructB) - c1.Equal(c1) - d1.Equal(&d1) - e1.Equal(e1) - f1.Equal(&f1) - - a2.Equal(*a2.StructA) - b2.Equal(b2.StructB) - c2.Equal(c2) - d2.Equal(&d2) - e2.Equal(e2) - f2.Equal(&f2) -} - -type ( - privateStruct struct{ Public, private int } - PublicStruct struct{ Public, private int } - ParentStructA struct{ privateStruct } - ParentStructB struct{ PublicStruct } - ParentStructC struct { - privateStruct - Public, private int - } - ParentStructD struct { - PublicStruct - Public, private int - } - ParentStructE struct { - privateStruct - PublicStruct - } - ParentStructF struct { - privateStruct - PublicStruct - Public, private int - } - ParentStructG struct { - *privateStruct - } - ParentStructH struct { - *PublicStruct - } - ParentStructI struct { - *privateStruct - *PublicStruct - } - ParentStructJ struct { - *privateStruct - *PublicStruct - Public PublicStruct - private privateStruct - } -) - -func NewParentStructG() *ParentStructG { - return &ParentStructG{new(privateStruct)} -} -func NewParentStructH() *ParentStructH { - return &ParentStructH{new(PublicStruct)} -} -func NewParentStructI() *ParentStructI { - return &ParentStructI{new(privateStruct), new(PublicStruct)} -} -func NewParentStructJ() *ParentStructJ { - return &ParentStructJ{ - privateStruct: new(privateStruct), PublicStruct: new(PublicStruct), - } -} -func (s *privateStruct) SetPrivate(i int) { s.private = i } -func (s *PublicStruct) SetPrivate(i int) { s.private = i } -func (s *ParentStructC) SetPrivate(i int) { s.private = i } -func (s *ParentStructD) SetPrivate(i int) { s.private = i } -func (s *ParentStructF) SetPrivate(i int) { s.private = i } -func (s *ParentStructA) PrivateStruct() *privateStruct { return &s.privateStruct } -func (s *ParentStructC) PrivateStruct() *privateStruct { return &s.privateStruct } -func (s *ParentStructE) PrivateStruct() *privateStruct { return &s.privateStruct } -func (s *ParentStructF) PrivateStruct() *privateStruct { return &s.privateStruct } -func (s *ParentStructG) PrivateStruct() *privateStruct { return s.privateStruct } -func (s *ParentStructI) PrivateStruct() *privateStruct { return s.privateStruct } -func (s *ParentStructJ) PrivateStruct() *privateStruct { return s.privateStruct } -func (s *ParentStructJ) Private() *privateStruct { return &s.private } diff --git a/vendor/github.com/lib/pq/certs/README b/vendor/github.com/lib/pq/certs/README deleted file mode 100644 index 24ab7b2..0000000 --- a/vendor/github.com/lib/pq/certs/README +++ /dev/null @@ -1,3 +0,0 @@ -This directory contains certificates and private keys for testing some -SSL-related functionality in Travis. Do NOT use these certificates for -anything other than testing. diff --git a/vendor/github.com/lib/pq/certs/bogus_root.crt b/vendor/github.com/lib/pq/certs/bogus_root.crt deleted file mode 100644 index 1239db3..0000000 --- a/vendor/github.com/lib/pq/certs/bogus_root.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDBjCCAe6gAwIBAgIQSnDYp/Naet9HOZljF5PuwDANBgkqhkiG9w0BAQsFADAr -MRIwEAYDVQQKEwlDb2Nrcm9hY2gxFTATBgNVBAMTDENvY2tyb2FjaCBDQTAeFw0x -NjAyMDcxNjQ0MzdaFw0xNzAyMDYxNjQ0MzdaMCsxEjAQBgNVBAoTCUNvY2tyb2Fj -aDEVMBMGA1UEAxMMQ29ja3JvYWNoIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEAxdln3/UdgP7ayA/G1kT7upjLe4ERwQjYQ25q0e1+vgsB5jhiirxJ -e0+WkhhYu/mwoSAXzvlsbZ2PWFyfdanZeD/Lh6SvIeWXVVaPcWVWL1TEcoN2jr5+ -E85MMHmbbmaT2he8s6br2tM/UZxyTQ2XRprIzApbDssyw1c0Yufcpu3C6267FLEl -IfcWrzDhnluFhthhtGXv3ToD8IuMScMC5qlKBXtKmD1B5x14ngO/ecNJ+OlEi0HU -mavK4KWgI2rDXRZ2EnCpyTZdkc3kkRnzKcg653oOjMDRZdrhfIrha+Jq38ACsUmZ -Su7Sp5jkIHOCO8Zg+l6GKVSq37dKMapD8wIDAQABoyYwJDAOBgNVHQ8BAf8EBAMC -AuQwEgYDVR0TAQH/BAgwBgEB/wIBATANBgkqhkiG9w0BAQsFAAOCAQEAwZ2Tu0Yu -rrSVdMdoPEjT1IZd+5OhM/SLzL0ddtvTithRweLHsw2lDQYlXFqr24i3UGZJQ1sp -cqSrNwswgLUQT3vWyTjmM51HEb2vMYWKmjZ+sBQYAUP1CadrN/+OTfNGnlF1+B4w -IXOzh7EvQmJJnNybLe4a/aRvj1NE2n8Z898B76SVU9WbfKKz8VwLzuIPDqkKcZda -lMy5yzthyztV9YjcWs2zVOUGZvGdAhDrvZuUq6mSmxrBEvR2LBOggmVf3tGRT+Ls -lW7c9Lrva5zLHuqmoPP07A+vuI9a0D1X44jwGDuPWJ5RnTOQ63Uez12mKNjqleHw -DnkwNanuO8dhAA== ------END CERTIFICATE----- diff --git a/vendor/github.com/lib/pq/certs/postgresql.crt b/vendor/github.com/lib/pq/certs/postgresql.crt deleted file mode 100644 index 6e6b428..0000000 --- a/vendor/github.com/lib/pq/certs/postgresql.crt +++ /dev/null @@ -1,69 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 2 (0x2) - Signature Algorithm: sha256WithRSAEncryption - Issuer: C=US, ST=Nevada, L=Las Vegas, O=github.com/lib/pq, CN=pq CA - Validity - Not Before: Oct 11 15:10:11 2014 GMT - Not After : Oct 8 15:10:11 2024 GMT - Subject: C=US, ST=Nevada, L=Las Vegas, O=github.com/lib/pq, CN=pqgosslcert - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (1024 bit) - Modulus (1024 bit): - 00:e3:8c:06:9a:70:54:51:d1:34:34:83:39:cd:a2: - 59:0f:05:ed:8d:d8:0e:34:d0:92:f4:09:4d:ee:8c: - 78:55:49:24:f8:3c:e0:34:58:02:b2:e7:94:58:c1: - e8:e5:bb:d1:af:f6:54:c1:40:b1:90:70:79:0d:35: - 54:9c:8f:16:e9:c2:f0:92:e6:64:49:38:c1:76:f8: - 47:66:c4:5b:4a:b6:a9:43:ce:c8:be:6c:4d:2b:94: - 97:3c:55:bc:d1:d0:6e:b7:53:ae:89:5c:4b:6b:86: - 40:be:c1:ae:1e:64:ce:9c:ae:87:0a:69:e5:c8:21: - 12:be:ae:1d:f6:45:df:16:a7 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 9B:25:31:63:A2:D8:06:FF:CB:E3:E9:96:FF:0D:BA:DC:12:7D:04:CF - X509v3 Authority Key Identifier: - keyid:52:93:ED:1E:76:0A:9F:65:4F:DE:19:66:C1:D5:22:40:35:CB:A0:72 - - X509v3 Basic Constraints: - CA:FALSE - X509v3 Key Usage: - Digital Signature, Non Repudiation, Key Encipherment - Signature Algorithm: sha256WithRSAEncryption - 3e:f5:f8:0b:4e:11:bd:00:86:1f:ce:dc:97:02:98:91:11:f5: - 65:f6:f2:8a:b2:3e:47:92:05:69:28:c9:e9:b4:f7:cf:93:d1: - 2d:81:5d:00:3c:23:be:da:70:ea:59:e1:2c:d3:25:49:ae:a6: - 95:54:c1:10:df:23:e3:fe:d6:e4:76:c7:6b:73:ad:1b:34:7c: - e2:56:cc:c0:37:ae:c5:7a:11:20:6c:3d:05:0e:99:cd:22:6c: - cf:59:a1:da:28:d4:65:ba:7d:2f:2b:3d:69:6d:a6:c1:ae:57: - bf:56:64:13:79:f8:48:46:65:eb:81:67:28:0b:7b:de:47:10: - b3:80:3c:31:d1:58:94:01:51:4a:c7:c8:1a:01:a8:af:c4:cd: - bb:84:a5:d9:8b:b4:b9:a1:64:3e:95:d9:90:1d:d5:3f:67:cc: - 3b:ba:f5:b4:d1:33:77:ee:c2:d2:3e:7e:c5:66:6e:b7:35:4c: - 60:57:b0:b8:be:36:c8:f3:d3:95:8c:28:4a:c9:f7:27:a4:0d: - e5:96:99:eb:f5:c8:bd:f3:84:6d:ef:02:f9:8a:36:7d:6b:5f: - 36:68:37:41:d9:74:ae:c6:78:2e:44:86:a1:ad:43:ca:fb:b5: - 3e:ba:10:23:09:02:ac:62:d1:d0:83:c8:95:b9:e3:5e:30:ff: - 5b:2b:38:fa ------BEGIN CERTIFICATE----- -MIIDEzCCAfugAwIBAgIBAjANBgkqhkiG9w0BAQsFADBeMQswCQYDVQQGEwJVUzEP -MA0GA1UECBMGTmV2YWRhMRIwEAYDVQQHEwlMYXMgVmVnYXMxGjAYBgNVBAoTEWdp -dGh1Yi5jb20vbGliL3BxMQ4wDAYDVQQDEwVwcSBDQTAeFw0xNDEwMTExNTEwMTFa -Fw0yNDEwMDgxNTEwMTFaMGQxCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZOZXZhZGEx -EjAQBgNVBAcTCUxhcyBWZWdhczEaMBgGA1UEChMRZ2l0aHViLmNvbS9saWIvcHEx -FDASBgNVBAMTC3BxZ29zc2xjZXJ0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB -gQDjjAaacFRR0TQ0gznNolkPBe2N2A400JL0CU3ujHhVSST4POA0WAKy55RYwejl -u9Gv9lTBQLGQcHkNNVScjxbpwvCS5mRJOMF2+EdmxFtKtqlDzsi+bE0rlJc8VbzR -0G63U66JXEtrhkC+wa4eZM6crocKaeXIIRK+rh32Rd8WpwIDAQABo1owWDAdBgNV -HQ4EFgQUmyUxY6LYBv/L4+mW/w263BJ9BM8wHwYDVR0jBBgwFoAUUpPtHnYKn2VP -3hlmwdUiQDXLoHIwCQYDVR0TBAIwADALBgNVHQ8EBAMCBeAwDQYJKoZIhvcNAQEL -BQADggEBAD71+AtOEb0Ahh/O3JcCmJER9WX28oqyPkeSBWkoyem098+T0S2BXQA8 -I77acOpZ4SzTJUmuppVUwRDfI+P+1uR2x2tzrRs0fOJWzMA3rsV6ESBsPQUOmc0i -bM9Zodoo1GW6fS8rPWltpsGuV79WZBN5+EhGZeuBZygLe95HELOAPDHRWJQBUUrH -yBoBqK/EzbuEpdmLtLmhZD6V2ZAd1T9nzDu69bTRM3fuwtI+fsVmbrc1TGBXsLi+ -Nsjz05WMKErJ9yekDeWWmev1yL3zhG3vAvmKNn1rXzZoN0HZdK7GeC5EhqGtQ8r7 -tT66ECMJAqxi0dCDyJW5414w/1srOPo= ------END CERTIFICATE----- diff --git a/vendor/github.com/lib/pq/certs/postgresql.key b/vendor/github.com/lib/pq/certs/postgresql.key deleted file mode 100644 index eb8b20b..0000000 --- a/vendor/github.com/lib/pq/certs/postgresql.key +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICWwIBAAKBgQDjjAaacFRR0TQ0gznNolkPBe2N2A400JL0CU3ujHhVSST4POA0 -WAKy55RYwejlu9Gv9lTBQLGQcHkNNVScjxbpwvCS5mRJOMF2+EdmxFtKtqlDzsi+ -bE0rlJc8VbzR0G63U66JXEtrhkC+wa4eZM6crocKaeXIIRK+rh32Rd8WpwIDAQAB -AoGAM5dM6/kp9P700i8qjOgRPym96Zoh5nGfz/rIE5z/r36NBkdvIg8OVZfR96nH -b0b9TOMR5lsPp0sI9yivTWvX6qyvLJRWy2vvx17hXK9NxXUNTAm0PYZUTvCtcPeX -RnJpzQKNZQPkFzF0uXBc4CtPK2Vz0+FGvAelrhYAxnw1dIkCQQD+9qaW5QhXjsjb -Nl85CmXgxPmGROcgLQCO+omfrjf9UXrituU9Dz6auym5lDGEdMFnkzfr+wpasEy9 -mf5ZZOhDAkEA5HjXfVGaCtpydOt6hDon/uZsyssCK2lQ7NSuE3vP+sUsYMzIpEoy -t3VWXqKbo+g9KNDTP4WEliqp1aiSIylzzQJANPeqzihQnlgEdD4MdD4rwhFJwVIp -Le8Lcais1KaN7StzOwxB/XhgSibd2TbnPpw+3bSg5n5lvUdo+e62/31OHwJAU1jS -I+F09KikQIr28u3UUWT2IzTT4cpVv1AHAQyV3sG3YsjSGT0IK20eyP9BEBZU2WL0 -7aNjrvR5aHxKc5FXsQJABsFtyGpgI5X4xufkJZVZ+Mklz2n7iXa+XPatMAHFxAtb -EEMt60rngwMjXAzBSC6OYuYogRRAY3UCacNC5VhLYQ== ------END RSA PRIVATE KEY----- diff --git a/vendor/github.com/lib/pq/certs/root.crt b/vendor/github.com/lib/pq/certs/root.crt deleted file mode 100644 index aecf8f6..0000000 --- a/vendor/github.com/lib/pq/certs/root.crt +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEAzCCAuugAwIBAgIJANmheROCdW1NMA0GCSqGSIb3DQEBBQUAMF4xCzAJBgNV -BAYTAlVTMQ8wDQYDVQQIEwZOZXZhZGExEjAQBgNVBAcTCUxhcyBWZWdhczEaMBgG -A1UEChMRZ2l0aHViLmNvbS9saWIvcHExDjAMBgNVBAMTBXBxIENBMB4XDTE0MTAx -MTE1MDQyOVoXDTI0MTAwODE1MDQyOVowXjELMAkGA1UEBhMCVVMxDzANBgNVBAgT -Bk5ldmFkYTESMBAGA1UEBxMJTGFzIFZlZ2FzMRowGAYDVQQKExFnaXRodWIuY29t -L2xpYi9wcTEOMAwGA1UEAxMFcHEgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQCV4PxP7ShzWBzUCThcKk3qZtOLtHmszQVtbqhvgTpm1kTRtKBdVMu0 -pLAHQ3JgJCnAYgH0iZxVGoMP16T3irdgsdC48+nNTFM2T0cCdkfDURGIhSFN47cb -Pgy306BcDUD2q7ucW33+dlFSRuGVewocoh4BWM/vMtMvvWzdi4Ag/L/jhb+5wZxZ -sWymsadOVSDePEMKOvlCa3EdVwVFV40TVyDb+iWBUivDAYsS2a3KajuJrO6MbZiE -Sp2RCIkZS2zFmzWxVRi9ZhzIZhh7EVF9JAaNC3T52jhGUdlRq3YpBTMnd89iOh74 -6jWXG7wSuPj3haFzyNhmJ0ZUh+2Ynoh1AgMBAAGjgcMwgcAwHQYDVR0OBBYEFFKT -7R52Cp9lT94ZZsHVIkA1y6ByMIGQBgNVHSMEgYgwgYWAFFKT7R52Cp9lT94ZZsHV -IkA1y6ByoWKkYDBeMQswCQYDVQQGEwJVUzEPMA0GA1UECBMGTmV2YWRhMRIwEAYD -VQQHEwlMYXMgVmVnYXMxGjAYBgNVBAoTEWdpdGh1Yi5jb20vbGliL3BxMQ4wDAYD -VQQDEwVwcSBDQYIJANmheROCdW1NMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEF -BQADggEBAAEhCLWkqJNMI8b4gkbmj5fqQ/4+oO83bZ3w2Oqf6eZ8I8BC4f2NOyE6 -tRUlq5+aU7eqC1cOAvGjO+YHN/bF/DFpwLlzvUSXt+JP/pYcUjL7v+pIvwqec9hD -ndvM4iIbkD/H/OYQ3L+N3W+G1x7AcFIX+bGCb3PzYVQAjxreV6//wgKBosMGFbZo -HPxT9RPMun61SViF04H5TNs0derVn1+5eiiYENeAhJzQNyZoOOUuX1X/Inx9bEPh -C5vFBtSMgIytPgieRJVWAiMLYsfpIAStrHztRAbBs2DU01LmMgRvHdxgFEKinC/d -UHZZQDP+6pT+zADrGhQGXe4eThaO6f0= ------END CERTIFICATE----- diff --git a/vendor/github.com/lib/pq/certs/server.crt b/vendor/github.com/lib/pq/certs/server.crt deleted file mode 100644 index ddc995a..0000000 --- a/vendor/github.com/lib/pq/certs/server.crt +++ /dev/null @@ -1,81 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha256WithRSAEncryption - Issuer: C=US, ST=Nevada, L=Las Vegas, O=github.com/lib/pq, CN=pq CA - Validity - Not Before: Oct 11 15:05:15 2014 GMT - Not After : Oct 8 15:05:15 2024 GMT - Subject: C=US, ST=Nevada, L=Las Vegas, O=github.com/lib/pq, CN=postgres - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - RSA Public Key: (2048 bit) - Modulus (2048 bit): - 00:d7:8a:4c:85:fb:17:a5:3c:8f:e0:72:11:29:ce: - 3f:b0:1f:3f:7d:c6:ee:7f:a7:fc:02:2b:35:47:08: - a6:3d:90:df:5c:56:14:94:00:c7:6d:d1:d2:e2:61: - 95:77:b8:e3:a6:66:31:f9:1f:21:7d:62:e1:27:da: - 94:37:61:4a:ea:63:53:a0:61:b8:9c:bb:a5:e2:e7: - b7:a6:d8:0f:05:04:c7:29:e2:ea:49:2b:7f:de:15: - 00:a6:18:70:50:c7:0c:de:9a:f9:5a:96:b0:e1:94: - 06:c6:6d:4a:21:3b:b4:0f:a5:6d:92:86:34:b2:4e: - d7:0e:a7:19:c0:77:0b:7b:87:c8:92:de:42:ff:86: - d2:b7:9a:a4:d4:15:23:ca:ad:a5:69:21:b8:ce:7e: - 66:cb:85:5d:b9:ed:8b:2d:09:8d:94:e4:04:1e:72: - ec:ef:d0:76:90:15:5a:a4:f7:91:4b:e9:ce:4e:9d: - 5d:9a:70:17:9c:d8:e9:73:83:ea:3d:61:99:a6:cd: - ac:91:40:5a:88:77:e5:4e:2a:8e:3d:13:f3:f9:38: - 6f:81:6b:8a:95:ca:0e:07:ab:6f:da:b4:8c:d9:ff: - aa:78:03:aa:c7:c2:cf:6f:64:92:d3:d8:83:d5:af: - f1:23:18:a7:2e:7b:17:0b:e7:7d:f1:fa:a8:41:a3: - 04:57 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - EE:F0:B3:46:DC:C7:09:EB:0E:B6:2F:E5:FE:62:60:45:44:9F:59:CC - X509v3 Authority Key Identifier: - keyid:52:93:ED:1E:76:0A:9F:65:4F:DE:19:66:C1:D5:22:40:35:CB:A0:72 - - X509v3 Basic Constraints: - CA:FALSE - X509v3 Key Usage: - Digital Signature, Non Repudiation, Key Encipherment - Signature Algorithm: sha256WithRSAEncryption - 7e:5a:6e:be:bf:d2:6c:c1:d6:fa:b6:fb:3f:06:53:36:08:87: - 9d:95:b1:39:af:9e:f6:47:38:17:39:da:25:7c:f2:ad:0c:e3: - ab:74:19:ca:fb:8c:a0:50:c0:1d:19:8a:9c:21:ed:0f:3a:d1: - 96:54:2e:10:09:4f:b8:70:f7:2b:99:43:d2:c6:15:bc:3f:24: - 7d:28:39:32:3f:8d:a4:4f:40:75:7f:3e:0d:1c:d1:69:f2:4e: - 98:83:47:97:d2:25:ac:c9:36:86:2f:04:a6:c4:86:c7:c4:00: - 5f:7f:b9:ad:fc:bf:e9:f5:78:d7:82:1a:51:0d:fc:ab:9e:92: - 1d:5f:0c:18:d1:82:e0:14:c9:ce:91:89:71:ff:49:49:ff:35: - bf:7b:44:78:42:c1:d0:66:65:bb:28:2e:60:ca:9b:20:12:a9: - 90:61:b1:96:ec:15:46:c9:37:f7:07:90:8a:89:45:2a:3f:37: - ec:dc:e3:e5:8f:c3:3a:57:80:a5:54:60:0c:e1:b2:26:99:2b: - 40:7e:36:d1:9a:70:02:ec:63:f4:3b:72:ae:81:fb:30:20:6d: - cb:48:46:c6:b5:8f:39:b1:84:05:25:55:8d:f5:62:f6:1b:46: - 2e:da:a3:4c:26:12:44:d7:56:b6:b8:a9:ca:d3:ab:71:45:7c: - 9f:48:6d:1e ------BEGIN CERTIFICATE----- -MIIDlDCCAnygAwIBAgIBATANBgkqhkiG9w0BAQsFADBeMQswCQYDVQQGEwJVUzEP -MA0GA1UECBMGTmV2YWRhMRIwEAYDVQQHEwlMYXMgVmVnYXMxGjAYBgNVBAoTEWdp -dGh1Yi5jb20vbGliL3BxMQ4wDAYDVQQDEwVwcSBDQTAeFw0xNDEwMTExNTA1MTVa -Fw0yNDEwMDgxNTA1MTVaMGExCzAJBgNVBAYTAlVTMQ8wDQYDVQQIEwZOZXZhZGEx -EjAQBgNVBAcTCUxhcyBWZWdhczEaMBgGA1UEChMRZ2l0aHViLmNvbS9saWIvcHEx -ETAPBgNVBAMTCHBvc3RncmVzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC -AQEA14pMhfsXpTyP4HIRKc4/sB8/fcbuf6f8Ais1RwimPZDfXFYUlADHbdHS4mGV -d7jjpmYx+R8hfWLhJ9qUN2FK6mNToGG4nLul4ue3ptgPBQTHKeLqSSt/3hUAphhw -UMcM3pr5Wpaw4ZQGxm1KITu0D6VtkoY0sk7XDqcZwHcLe4fIkt5C/4bSt5qk1BUj -yq2laSG4zn5my4Vdue2LLQmNlOQEHnLs79B2kBVapPeRS+nOTp1dmnAXnNjpc4Pq -PWGZps2skUBaiHflTiqOPRPz+ThvgWuKlcoOB6tv2rSM2f+qeAOqx8LPb2SS09iD -1a/xIxinLnsXC+d98fqoQaMEVwIDAQABo1owWDAdBgNVHQ4EFgQU7vCzRtzHCesO -ti/l/mJgRUSfWcwwHwYDVR0jBBgwFoAUUpPtHnYKn2VP3hlmwdUiQDXLoHIwCQYD -VR0TBAIwADALBgNVHQ8EBAMCBeAwDQYJKoZIhvcNAQELBQADggEBAH5abr6/0mzB -1vq2+z8GUzYIh52VsTmvnvZHOBc52iV88q0M46t0Gcr7jKBQwB0Zipwh7Q860ZZU -LhAJT7hw9yuZQ9LGFbw/JH0oOTI/jaRPQHV/Pg0c0WnyTpiDR5fSJazJNoYvBKbE -hsfEAF9/ua38v+n1eNeCGlEN/Kuekh1fDBjRguAUyc6RiXH/SUn/Nb97RHhCwdBm -ZbsoLmDKmyASqZBhsZbsFUbJN/cHkIqJRSo/N+zc4+WPwzpXgKVUYAzhsiaZK0B+ -NtGacALsY/Q7cq6B+zAgbctIRsa1jzmxhAUlVY31YvYbRi7ao0wmEkTXVra4qcrT -q3FFfJ9IbR4= ------END CERTIFICATE----- diff --git a/vendor/github.com/lib/pq/certs/server.key b/vendor/github.com/lib/pq/certs/server.key deleted file mode 100644 index bd7b019..0000000 --- a/vendor/github.com/lib/pq/certs/server.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEogIBAAKCAQEA14pMhfsXpTyP4HIRKc4/sB8/fcbuf6f8Ais1RwimPZDfXFYU -lADHbdHS4mGVd7jjpmYx+R8hfWLhJ9qUN2FK6mNToGG4nLul4ue3ptgPBQTHKeLq -SSt/3hUAphhwUMcM3pr5Wpaw4ZQGxm1KITu0D6VtkoY0sk7XDqcZwHcLe4fIkt5C -/4bSt5qk1BUjyq2laSG4zn5my4Vdue2LLQmNlOQEHnLs79B2kBVapPeRS+nOTp1d -mnAXnNjpc4PqPWGZps2skUBaiHflTiqOPRPz+ThvgWuKlcoOB6tv2rSM2f+qeAOq -x8LPb2SS09iD1a/xIxinLnsXC+d98fqoQaMEVwIDAQABAoIBAF3ZoihUhJ82F4+r -Gz4QyDpv4L1reT2sb1aiabhcU8ZK5nbWJG+tRyjSS/i2dNaEcttpdCj9HR/zhgZM -bm0OuAgG58rVwgS80CZUruq++Qs+YVojq8/gWPTiQD4SNhV2Fmx3HkwLgUk3oxuT -SsvdqzGE3okGVrutCIcgy126eA147VPMoej1Bb3fO6npqK0pFPhZfAc0YoqJuM+k -obRm5pAnGUipyLCFXjA9HYPKwYZw2RtfdA3CiImHeanSdqS+ctrC9y8BV40Th7gZ -haXdKUNdjmIxV695QQ1mkGqpKLZFqhzKioGQ2/Ly2d1iaKN9fZltTusu8unepWJ2 -tlT9qMECgYEA9uHaF1t2CqE+AJvWTihHhPIIuLxoOQXYea1qvxfcH/UMtaLKzCNm -lQ5pqCGsPvp+10f36yttO1ZehIvlVNXuJsjt0zJmPtIolNuJY76yeussfQ9jHheB -5uPEzCFlHzxYbBUyqgWaF6W74okRGzEGJXjYSP0yHPPdU4ep2q3bGiUCgYEA34Af -wBSuQSK7uLxArWHvQhyuvi43ZGXls6oRGl+Ysj54s8BP6XGkq9hEJ6G4yxgyV+BR -DUOs5X8/TLT8POuIMYvKTQthQyCk0eLv2FLdESDuuKx0kBVY3s8lK3/z5HhrdOiN -VMNZU+xDKgKc3hN9ypkk8vcZe6EtH7Y14e0rVcsCgYBTgxi8F/M5K0wG9rAqphNz -VFBA9XKn/2M33cKjO5X5tXIEKzpAjaUQvNxexG04rJGljzG8+mar0M6ONahw5yD1 -O7i/XWgazgpuOEkkVYiYbd8RutfDgR4vFVMn3hAP3eDnRtBplRWH9Ec3HTiNIys6 -F8PKBOQjyRZQQC7jyzW3hQKBgACe5HeuFwXLSOYsb6mLmhR+6+VPT4wR1F95W27N -USk9jyxAnngxfpmTkiziABdgS9N+pfr5cyN4BP77ia/Jn6kzkC5Cl9SN5KdIkA3z -vPVtN/x/ThuQU5zaymmig1ThGLtMYggYOslG4LDfLPxY5YKIhle+Y+259twdr2yf -Mf2dAoGAaGv3tWMgnIdGRk6EQL/yb9PKHo7ShN+tKNlGaK7WwzBdKs+Fe8jkgcr7 -pz4Ne887CmxejdISzOCcdT+Zm9Bx6I/uZwWOtDvWpIgIxVX9a9URj/+D1MxTE/y4 -d6H+c89yDY62I2+drMpdjCd3EtCaTlxpTbRS+s1eAHMH7aEkcCE= ------END RSA PRIVATE KEY----- diff --git a/vendor/github.com/lib/pq/hstore/hstore.go b/vendor/github.com/lib/pq/hstore/hstore.go deleted file mode 100644 index 72d5abf..0000000 --- a/vendor/github.com/lib/pq/hstore/hstore.go +++ /dev/null @@ -1,118 +0,0 @@ -package hstore - -import ( - "database/sql" - "database/sql/driver" - "strings" -) - -// A wrapper for transferring Hstore values back and forth easily. -type Hstore struct { - Map map[string]sql.NullString -} - -// escapes and quotes hstore keys/values -// s should be a sql.NullString or string -func hQuote(s interface{}) string { - var str string - switch v := s.(type) { - case sql.NullString: - if !v.Valid { - return "NULL" - } - str = v.String - case string: - str = v - default: - panic("not a string or sql.NullString") - } - - str = strings.Replace(str, "\\", "\\\\", -1) - return `"` + strings.Replace(str, "\"", "\\\"", -1) + `"` -} - -// Scan implements the Scanner interface. -// -// Note h.Map is reallocated before the scan to clear existing values. If the -// hstore column's database value is NULL, then h.Map is set to nil instead. -func (h *Hstore) Scan(value interface{}) error { - if value == nil { - h.Map = nil - return nil - } - h.Map = make(map[string]sql.NullString) - var b byte - pair := [][]byte{{}, {}} - pi := 0 - inQuote := false - didQuote := false - sawSlash := false - bindex := 0 - for bindex, b = range value.([]byte) { - if sawSlash { - pair[pi] = append(pair[pi], b) - sawSlash = false - continue - } - - switch b { - case '\\': - sawSlash = true - continue - case '"': - inQuote = !inQuote - if !didQuote { - didQuote = true - } - continue - default: - if !inQuote { - switch b { - case ' ', '\t', '\n', '\r': - continue - case '=': - continue - case '>': - pi = 1 - didQuote = false - continue - case ',': - s := string(pair[1]) - if !didQuote && len(s) == 4 && strings.ToLower(s) == "null" { - h.Map[string(pair[0])] = sql.NullString{String: "", Valid: false} - } else { - h.Map[string(pair[0])] = sql.NullString{String: string(pair[1]), Valid: true} - } - pair[0] = []byte{} - pair[1] = []byte{} - pi = 0 - continue - } - } - } - pair[pi] = append(pair[pi], b) - } - if bindex > 0 { - s := string(pair[1]) - if !didQuote && len(s) == 4 && strings.ToLower(s) == "null" { - h.Map[string(pair[0])] = sql.NullString{String: "", Valid: false} - } else { - h.Map[string(pair[0])] = sql.NullString{String: string(pair[1]), Valid: true} - } - } - return nil -} - -// Value implements the driver Valuer interface. Note if h.Map is nil, the -// database column value will be set to NULL. -func (h Hstore) Value() (driver.Value, error) { - if h.Map == nil { - return nil, nil - } - parts := []string{} - for key, val := range h.Map { - thispart := hQuote(key) + "=>" + hQuote(val) - parts = append(parts, thispart) - } - return []byte(strings.Join(parts, ",")), nil -} diff --git a/vendor/github.com/lib/pq/hstore/hstore_test.go b/vendor/github.com/lib/pq/hstore/hstore_test.go deleted file mode 100644 index 1c9f2bd..0000000 --- a/vendor/github.com/lib/pq/hstore/hstore_test.go +++ /dev/null @@ -1,148 +0,0 @@ -package hstore - -import ( - "database/sql" - "os" - "testing" - - _ "github.com/lib/pq" -) - -type Fatalistic interface { - Fatal(args ...interface{}) -} - -func openTestConn(t Fatalistic) *sql.DB { - datname := os.Getenv("PGDATABASE") - sslmode := os.Getenv("PGSSLMODE") - - if datname == "" { - os.Setenv("PGDATABASE", "pqgotest") - } - - if sslmode == "" { - os.Setenv("PGSSLMODE", "disable") - } - - conn, err := sql.Open("postgres", "") - if err != nil { - t.Fatal(err) - } - - return conn -} - -func TestHstore(t *testing.T) { - db := openTestConn(t) - defer db.Close() - - // quitely create hstore if it doesn't exist - _, err := db.Exec("CREATE EXTENSION IF NOT EXISTS hstore") - if err != nil { - t.Skipf("Skipping hstore tests - hstore extension create failed: %s", err.Error()) - } - - hs := Hstore{} - - // test for null-valued hstores - err = db.QueryRow("SELECT NULL::hstore").Scan(&hs) - if err != nil { - t.Fatal(err) - } - if hs.Map != nil { - t.Fatalf("expected null map") - } - - err = db.QueryRow("SELECT $1::hstore", hs).Scan(&hs) - if err != nil { - t.Fatalf("re-query null map failed: %s", err.Error()) - } - if hs.Map != nil { - t.Fatalf("expected null map") - } - - // test for empty hstores - err = db.QueryRow("SELECT ''::hstore").Scan(&hs) - if err != nil { - t.Fatal(err) - } - if hs.Map == nil { - t.Fatalf("expected empty map, got null map") - } - if len(hs.Map) != 0 { - t.Fatalf("expected empty map, got len(map)=%d", len(hs.Map)) - } - - err = db.QueryRow("SELECT $1::hstore", hs).Scan(&hs) - if err != nil { - t.Fatalf("re-query empty map failed: %s", err.Error()) - } - if hs.Map == nil { - t.Fatalf("expected empty map, got null map") - } - if len(hs.Map) != 0 { - t.Fatalf("expected empty map, got len(map)=%d", len(hs.Map)) - } - - // a few example maps to test out - hsOnePair := Hstore{ - Map: map[string]sql.NullString{ - "key1": {String: "value1", Valid: true}, - }, - } - - hsThreePairs := Hstore{ - Map: map[string]sql.NullString{ - "key1": {String: "value1", Valid: true}, - "key2": {String: "value2", Valid: true}, - "key3": {String: "value3", Valid: true}, - }, - } - - hsSmorgasbord := Hstore{ - Map: map[string]sql.NullString{ - "nullstring": {String: "NULL", Valid: true}, - "actuallynull": {String: "", Valid: false}, - "NULL": {String: "NULL string key", Valid: true}, - "withbracket": {String: "value>42", Valid: true}, - "withequal": {String: "value=42", Valid: true}, - `"withquotes1"`: {String: `this "should" be fine`, Valid: true}, - `"withquotes"2"`: {String: `this "should\" also be fine`, Valid: true}, - "embedded1": {String: "value1=>x1", Valid: true}, - "embedded2": {String: `"value2"=>x2`, Valid: true}, - "withnewlines": {String: "\n\nvalue\t=>2", Valid: true}, - "<>": {String: `this, "should,\" also, => be fine`, Valid: true}, - }, - } - - // test encoding in query params, then decoding during Scan - testBidirectional := func(h Hstore) { - err = db.QueryRow("SELECT $1::hstore", h).Scan(&hs) - if err != nil { - t.Fatalf("re-query %d-pair map failed: %s", len(h.Map), err.Error()) - } - if hs.Map == nil { - t.Fatalf("expected %d-pair map, got null map", len(h.Map)) - } - if len(hs.Map) != len(h.Map) { - t.Fatalf("expected %d-pair map, got len(map)=%d", len(h.Map), len(hs.Map)) - } - - for key, val := range hs.Map { - otherval, found := h.Map[key] - if !found { - t.Fatalf(" key '%v' not found in %d-pair map", key, len(h.Map)) - } - if otherval.Valid != val.Valid { - t.Fatalf(" value %v <> %v in %d-pair map", otherval, val, len(h.Map)) - } - if otherval.String != val.String { - t.Fatalf(" value '%v' <> '%v' in %d-pair map", otherval.String, val.String, len(h.Map)) - } - } - } - - testBidirectional(hsOnePair) - testBidirectional(hsThreePairs) - testBidirectional(hsSmorgasbord) -} diff --git a/vendor/github.com/lib/pq/listen_example/doc.go b/vendor/github.com/lib/pq/listen_example/doc.go deleted file mode 100644 index 80f0a9b..0000000 --- a/vendor/github.com/lib/pq/listen_example/doc.go +++ /dev/null @@ -1,96 +0,0 @@ -/* - -Below you will find a self-contained Go program which uses the LISTEN / NOTIFY -mechanism to avoid polling the database while waiting for more work to arrive. - - // - // You can see the program in action by defining a function similar to - // the following: - // - // CREATE OR REPLACE FUNCTION public.get_work() - // RETURNS bigint - // LANGUAGE sql - // AS $$ - // SELECT CASE WHEN random() >= 0.2 THEN int8 '1' END - // $$ - // ; - - package main - - import ( - "database/sql" - "fmt" - "time" - - "github.com/lib/pq" - ) - - func doWork(db *sql.DB, work int64) { - // work here - } - - func getWork(db *sql.DB) { - for { - // get work from the database here - var work sql.NullInt64 - err := db.QueryRow("SELECT get_work()").Scan(&work) - if err != nil { - fmt.Println("call to get_work() failed: ", err) - time.Sleep(10 * time.Second) - continue - } - if !work.Valid { - // no more work to do - fmt.Println("ran out of work") - return - } - - fmt.Println("starting work on ", work.Int64) - go doWork(db, work.Int64) - } - } - - func waitForNotification(l *pq.Listener) { - select { - case <-l.Notify: - fmt.Println("received notification, new work available") - case <-time.After(90 * time.Second): - go l.Ping() - // Check if there's more work available, just in case it takes - // a while for the Listener to notice connection loss and - // reconnect. - fmt.Println("received no work for 90 seconds, checking for new work") - } - } - - func main() { - var conninfo string = "" - - db, err := sql.Open("postgres", conninfo) - if err != nil { - panic(err) - } - - reportProblem := func(ev pq.ListenerEventType, err error) { - if err != nil { - fmt.Println(err.Error()) - } - } - - listener := pq.NewListener(conninfo, 10 * time.Second, time.Minute, reportProblem) - err = listener.Listen("getwork") - if err != nil { - panic(err) - } - - fmt.Println("entering main loop") - for { - // process all available work before waiting for notifications - getWork(db) - waitForNotification(listener) - } - } - - -*/ -package listen_example diff --git a/vendor/github.com/magefile/mage/build/build.go b/vendor/github.com/magefile/mage/build/build.go deleted file mode 100644 index 242bea7..0000000 --- a/vendor/github.com/magefile/mage/build/build.go +++ /dev/null @@ -1,1654 +0,0 @@ -// 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 build - -import ( - "bytes" - "errors" - "fmt" - "go/ast" - "go/doc" - "go/parser" - "go/token" - "io" - "io/ioutil" - "log" - "os" - pathpkg "path" - "path/filepath" - "runtime" - "sort" - "strconv" - "strings" - "unicode" - "unicode/utf8" -) - -// A Context specifies the supporting context for a build. -type Context struct { - GOARCH string // target architecture - GOOS string // target operating system - GOROOT string // Go root - GOPATH string // Go path - CgoEnabled bool // whether cgo can be used - UseAllFiles bool // use files regardless of +build lines, file names - Compiler string // compiler to assume when computing target paths - - // RequiredTags lists tags that the must exist in a build tag in order for - // the file to be included in the build. If RequiredTags is empty, no tags - // are required. Note that this is mostly useful in filtering the list of - // files in a single directory. Using required tags across an entire - // compile step will likely exclude much, if not all of the standard library - // files. - RequiredTags []string - - // The build and release tags specify build constraints - // that should be considered satisfied when processing +build lines. - // Clients creating a new context may customize BuildTags, which - // defaults to empty, but it is usually an error to customize ReleaseTags, - // which defaults to the list of Go releases the current release is compatible with. - // In addition to the BuildTags and ReleaseTags, build constraints - // consider the values of GOARCH and GOOS as satisfied tags. - BuildTags []string - ReleaseTags []string - - // The install suffix specifies a suffix to use in the name of the installation - // directory. By default it is empty, but custom builds that need to keep - // their outputs separate can set InstallSuffix to do so. For example, when - // using the race detector, the go command uses InstallSuffix = "race", so - // that on a Linux/386 system, packages are written to a directory named - // "linux_386_race" instead of the usual "linux_386". - InstallSuffix string - - // By default, Import uses the operating system's file system calls - // to read directories and files. To read from other sources, - // callers can set the following functions. They all have default - // behaviors that use the local file system, so clients need only set - // the functions whose behaviors they wish to change. - - // JoinPath joins the sequence of path fragments into a single path. - // If JoinPath is nil, Import uses filepath.Join. - JoinPath func(elem ...string) string - - // SplitPathList splits the path list into a slice of individual paths. - // If SplitPathList is nil, Import uses filepath.SplitList. - SplitPathList func(list string) []string - - // IsAbsPath reports whether path is an absolute path. - // If IsAbsPath is nil, Import uses filepath.IsAbs. - IsAbsPath func(path string) bool - - // IsDir reports whether the path names a directory. - // If IsDir is nil, Import calls os.Stat and uses the result's IsDir method. - IsDir func(path string) bool - - // HasSubdir reports whether dir is lexically a subdirectory of - // root, perhaps multiple levels below. It does not try to check - // whether dir exists. - // If so, HasSubdir sets rel to a slash-separated path that - // can be joined to root to produce a path equivalent to dir. - // If HasSubdir is nil, Import uses an implementation built on - // filepath.EvalSymlinks. - HasSubdir func(root, dir string) (rel string, ok bool) - - // ReadDir returns a slice of os.FileInfo, sorted by Name, - // describing the content of the named directory. - // If ReadDir is nil, Import uses ioutil.ReadDir. - ReadDir func(dir string) ([]os.FileInfo, error) - - // OpenFile opens a file (not a directory) for reading. - // If OpenFile is nil, Import uses os.Open. - OpenFile func(path string) (io.ReadCloser, error) -} - -// joinPath calls ctxt.JoinPath (if not nil) or else filepath.Join. -func (ctxt *Context) joinPath(elem ...string) string { - if f := ctxt.JoinPath; f != nil { - return f(elem...) - } - return filepath.Join(elem...) -} - -// splitPathList calls ctxt.SplitPathList (if not nil) or else filepath.SplitList. -func (ctxt *Context) splitPathList(s string) []string { - if f := ctxt.SplitPathList; f != nil { - return f(s) - } - return filepath.SplitList(s) -} - -// isAbsPath calls ctxt.IsAbsPath (if not nil) or else filepath.IsAbs. -func (ctxt *Context) isAbsPath(path string) bool { - if f := ctxt.IsAbsPath; f != nil { - return f(path) - } - return filepath.IsAbs(path) -} - -// isDir calls ctxt.IsDir (if not nil) or else uses os.Stat. -func (ctxt *Context) isDir(path string) bool { - if f := ctxt.IsDir; f != nil { - return f(path) - } - fi, err := os.Stat(path) - return err == nil && fi.IsDir() -} - -// hasSubdir calls ctxt.HasSubdir (if not nil) or else uses -// the local file system to answer the question. -func (ctxt *Context) hasSubdir(root, dir string) (rel string, ok bool) { - if f := ctxt.HasSubdir; f != nil { - return f(root, dir) - } - - // Try using paths we received. - if rel, ok = hasSubdir(root, dir); ok { - return - } - - // Try expanding symlinks and comparing - // expanded against unexpanded and - // expanded against expanded. - rootSym, _ := filepath.EvalSymlinks(root) - dirSym, _ := filepath.EvalSymlinks(dir) - - if rel, ok = hasSubdir(rootSym, dir); ok { - return - } - if rel, ok = hasSubdir(root, dirSym); ok { - return - } - return hasSubdir(rootSym, dirSym) -} - -// hasSubdir reports if dir is within root by performing lexical analysis only. -func hasSubdir(root, dir string) (rel string, ok bool) { - const sep = string(filepath.Separator) - root = filepath.Clean(root) - if !strings.HasSuffix(root, sep) { - root += sep - } - dir = filepath.Clean(dir) - if !strings.HasPrefix(dir, root) { - return "", false - } - return filepath.ToSlash(dir[len(root):]), true -} - -// readDir calls ctxt.ReadDir (if not nil) or else ioutil.ReadDir. -func (ctxt *Context) readDir(path string) ([]os.FileInfo, error) { - if f := ctxt.ReadDir; f != nil { - return f(path) - } - return ioutil.ReadDir(path) -} - -// openFile calls ctxt.OpenFile (if not nil) or else os.Open. -func (ctxt *Context) openFile(path string) (io.ReadCloser, error) { - if fn := ctxt.OpenFile; fn != nil { - return fn(path) - } - - f, err := os.Open(path) - if err != nil { - return nil, err // nil interface - } - return f, nil -} - -// isFile determines whether path is a file by trying to open it. -// It reuses openFile instead of adding another function to the -// list in Context. -func (ctxt *Context) isFile(path string) bool { - f, err := ctxt.openFile(path) - if err != nil { - return false - } - f.Close() - return true -} - -// gopath returns the list of Go path directories. -func (ctxt *Context) gopath() []string { - var all []string - for _, p := range ctxt.splitPathList(ctxt.GOPATH) { - if p == "" || p == ctxt.GOROOT { - // Empty paths are uninteresting. - // If the path is the GOROOT, ignore it. - // People sometimes set GOPATH=$GOROOT. - // Do not get confused by this common mistake. - continue - } - if strings.HasPrefix(p, "~") { - // Path segments starting with ~ on Unix are almost always - // users who have incorrectly quoted ~ while setting GOPATH, - // preventing it from expanding to $HOME. - // The situation is made more confusing by the fact that - // bash allows quoted ~ in $PATH (most shells do not). - // Do not get confused by this, and do not try to use the path. - // It does not exist, and printing errors about it confuses - // those users even more, because they think "sure ~ exists!". - // The go command diagnoses this situation and prints a - // useful error. - // On Windows, ~ is used in short names, such as c:\progra~1 - // for c:\program files. - continue - } - all = append(all, p) - } - return all -} - -// SrcDirs returns a list of package source root directories. -// It draws from the current Go root and Go path but omits directories -// that do not exist. -func (ctxt *Context) SrcDirs() []string { - var all []string - if ctxt.GOROOT != "" { - dir := ctxt.joinPath(ctxt.GOROOT, "src") - if ctxt.isDir(dir) { - all = append(all, dir) - } - } - for _, p := range ctxt.gopath() { - dir := ctxt.joinPath(p, "src") - if ctxt.isDir(dir) { - all = append(all, dir) - } - } - return all -} - -// Default is the default Context for builds. -// It uses the GOARCH, GOOS, GOROOT, and GOPATH environment variables -// if set, or else the compiled code's GOARCH, GOOS, and GOROOT. -var Default Context = defaultContext() - -func defaultGOPATH() string { - env := "HOME" - if runtime.GOOS == "windows" { - env = "USERPROFILE" - } else if runtime.GOOS == "plan9" { - env = "home" - } - if home := os.Getenv(env); home != "" { - def := filepath.Join(home, "go") - if filepath.Clean(def) == filepath.Clean(runtime.GOROOT()) { - // Don't set the default GOPATH to GOROOT, - // as that will trigger warnings from the go tool. - return "" - } - return def - } - return "" -} - -func defaultContext() Context { - var c Context - - c.GOARCH = envOr("GOARCH", runtime.GOARCH) - c.GOOS = envOr("GOOS", runtime.GOOS) - c.GOROOT = pathpkg.Clean(runtime.GOROOT()) - c.GOPATH = envOr("GOPATH", defaultGOPATH()) - c.Compiler = runtime.Compiler - - // Each major Go release in the Go 1.x series should add a tag here. - // Old tags should not be removed. That is, the go1.x tag is present - // in all releases >= Go 1.x. Code that requires Go 1.x or later should - // say "+build go1.x", and code that should only be built before Go 1.x - // (perhaps it is the stub to use in that case) should say "+build !go1.x". - // NOTE: If you add to this list, also update the doc comment in doc.go. - c.ReleaseTags = []string{"go1.1", "go1.2", "go1.3", "go1.4", "go1.5", "go1.6", "go1.7", "go1.8", "go1.9"} - - env := os.Getenv("CGO_ENABLED") - if env == "" { - env = defaultCGO_ENABLED - } - switch env { - case "1": - c.CgoEnabled = true - case "0": - c.CgoEnabled = false - default: - // cgo must be explicitly enabled for cross compilation builds - if runtime.GOARCH == c.GOARCH && runtime.GOOS == c.GOOS { - c.CgoEnabled = cgoEnabled[c.GOOS+"/"+c.GOARCH] - break - } - c.CgoEnabled = false - } - - return c -} - -func envOr(name, def string) string { - s := os.Getenv(name) - if s == "" { - return def - } - return s -} - -// An ImportMode controls the behavior of the Import method. -type ImportMode uint - -const ( - // If FindOnly is set, Import stops after locating the directory - // that should contain the sources for a package. It does not - // read any files in the directory. - FindOnly ImportMode = 1 << iota - - // If AllowBinary is set, Import can be satisfied by a compiled - // package object without corresponding sources. - // - // Deprecated: - // The supported way to create a compiled-only package is to - // write source code containing a //go:binary-only-package comment at - // the top of the file. Such a package will be recognized - // regardless of this flag setting (because it has source code) - // and will have BinaryOnly set to true in the returned Package. - AllowBinary - - // If ImportComment is set, parse import comments on package statements. - // Import returns an error if it finds a comment it cannot understand - // or finds conflicting comments in multiple source files. - // See golang.org/s/go14customimport for more information. - ImportComment - - // By default, Import searches vendor directories - // that apply in the given source directory before searching - // the GOROOT and GOPATH roots. - // If an Import finds and returns a package using a vendor - // directory, the resulting ImportPath is the complete path - // to the package, including the path elements leading up - // to and including "vendor". - // For example, if Import("y", "x/subdir", 0) finds - // "x/vendor/y", the returned package's ImportPath is "x/vendor/y", - // not plain "y". - // See golang.org/s/go15vendor for more information. - // - // Setting IgnoreVendor ignores vendor directories. - // - // In contrast to the package's ImportPath, - // the returned package's Imports, TestImports, and XTestImports - // are always the exact import paths from the source files: - // Import makes no attempt to resolve or check those paths. - IgnoreVendor -) - -// A Package describes the Go package found in a directory. -type Package struct { - Dir string // directory containing package sources - Name string // package name - ImportComment string // path in import comment on package statement - Doc string // documentation synopsis - ImportPath string // import path of package ("" if unknown) - Root string // root of Go tree where this package lives - SrcRoot string // package source root directory ("" if unknown) - PkgRoot string // package install root directory ("" if unknown) - PkgTargetRoot string // architecture dependent install root directory ("" if unknown) - BinDir string // command install directory ("" if unknown) - Goroot bool // package found in Go root - PkgObj string // installed .a file - AllTags []string // tags that can influence file selection in this directory - ConflictDir string // this directory shadows Dir in $GOPATH - BinaryOnly bool // cannot be rebuilt from source (has //go:binary-only-package comment) - - // Source files - GoFiles []string // .go source files (excluding CgoFiles, TestGoFiles, XTestGoFiles) - CgoFiles []string // .go source files that import "C" - IgnoredGoFiles []string // .go source files ignored for this build - InvalidGoFiles []string // .go source files with detected problems (parse error, wrong package name, and so on) - CFiles []string // .c source files - CXXFiles []string // .cc, .cpp and .cxx source files - MFiles []string // .m (Objective-C) source files - HFiles []string // .h, .hh, .hpp and .hxx source files - FFiles []string // .f, .F, .for and .f90 Fortran source files - SFiles []string // .s source files - SwigFiles []string // .swig files - SwigCXXFiles []string // .swigcxx files - SysoFiles []string // .syso system object files to add to archive - - // Cgo directives - CgoCFLAGS []string // Cgo CFLAGS directives - CgoCPPFLAGS []string // Cgo CPPFLAGS directives - CgoCXXFLAGS []string // Cgo CXXFLAGS directives - CgoFFLAGS []string // Cgo FFLAGS directives - CgoLDFLAGS []string // Cgo LDFLAGS directives - CgoPkgConfig []string // Cgo pkg-config directives - - // Dependency information - Imports []string // import paths from GoFiles, CgoFiles - ImportPos map[string][]token.Position // line information for Imports - - // Test information - TestGoFiles []string // _test.go files in package - TestImports []string // import paths from TestGoFiles - TestImportPos map[string][]token.Position // line information for TestImports - XTestGoFiles []string // _test.go files outside package - XTestImports []string // import paths from XTestGoFiles - XTestImportPos map[string][]token.Position // line information for XTestImports -} - -// IsCommand reports whether the package is considered a -// command to be installed (not just a library). -// Packages named "main" are treated as commands. -func (p *Package) IsCommand() bool { - return p.Name == "main" -} - -// ImportDir is like Import but processes the Go package found in -// the named directory. -func (ctxt *Context) ImportDir(dir string, mode ImportMode) (*Package, error) { - return ctxt.Import(".", dir, mode) -} - -// NoGoError is the error used by Import to describe a directory -// containing no buildable Go source files. (It may still contain -// test files, files hidden by build tags, and so on.) -type NoGoError struct { - Dir string -} - -func (e *NoGoError) Error() string { - return "no buildable Go source files in " + e.Dir -} - -// MultiplePackageError describes a directory containing -// multiple buildable Go source files for multiple packages. -type MultiplePackageError struct { - Dir string // directory containing files - Packages []string // package names found - Files []string // corresponding files: Files[i] declares package Packages[i] -} - -func (e *MultiplePackageError) Error() string { - // Error string limited to two entries for compatibility. - return fmt.Sprintf("found packages %s (%s) and %s (%s) in %s", e.Packages[0], e.Files[0], e.Packages[1], e.Files[1], e.Dir) -} - -func nameExt(name string) string { - i := strings.LastIndex(name, ".") - if i < 0 { - return "" - } - return name[i:] -} - -// Import returns details about the Go package named by the import path, -// interpreting local import paths relative to the srcDir directory. -// If the path is a local import path naming a package that can be imported -// using a standard import path, the returned package will set p.ImportPath -// to that path. -// -// In the directory containing the package, .go, .c, .h, and .s files are -// considered part of the package except for: -// -// - .go files in package documentation -// - files starting with _ or . (likely editor temporary files) -// - files with build constraints not satisfied by the context -// -// If an error occurs, Import returns a non-nil error and a non-nil -// *Package containing partial information. -// -func (ctxt *Context) Import(path string, srcDir string, mode ImportMode) (*Package, error) { - p := &Package{ - ImportPath: path, - } - if path == "" { - return p, fmt.Errorf("import %q: invalid import path", path) - } - - var pkgtargetroot string - var pkga string - var pkgerr error - suffix := "" - if ctxt.InstallSuffix != "" { - suffix = "_" + ctxt.InstallSuffix - } - switch ctxt.Compiler { - case "gccgo": - pkgtargetroot = "pkg/gccgo_" + ctxt.GOOS + "_" + ctxt.GOARCH + suffix - case "gc": - pkgtargetroot = "pkg/" + ctxt.GOOS + "_" + ctxt.GOARCH + suffix - default: - // Save error for end of function. - pkgerr = fmt.Errorf("import %q: unknown compiler %q", path, ctxt.Compiler) - } - setPkga := func() { - switch ctxt.Compiler { - case "gccgo": - dir, elem := pathpkg.Split(p.ImportPath) - pkga = pkgtargetroot + "/" + dir + "lib" + elem + ".a" - case "gc": - pkga = pkgtargetroot + "/" + p.ImportPath + ".a" - } - } - setPkga() - - binaryOnly := false - if IsLocalImport(path) { - pkga = "" // local imports have no installed path - if srcDir == "" { - return p, fmt.Errorf("import %q: import relative to unknown directory", path) - } - if !ctxt.isAbsPath(path) { - p.Dir = ctxt.joinPath(srcDir, path) - } - // p.Dir directory may or may not exist. Gather partial information first, check if it exists later. - // Determine canonical import path, if any. - // Exclude results where the import path would include /testdata/. - inTestdata := func(sub string) bool { - return strings.Contains(sub, "/testdata/") || strings.HasSuffix(sub, "/testdata") || strings.HasPrefix(sub, "testdata/") || sub == "testdata" - } - if ctxt.GOROOT != "" { - root := ctxt.joinPath(ctxt.GOROOT, "src") - if sub, ok := ctxt.hasSubdir(root, p.Dir); ok && !inTestdata(sub) { - p.Goroot = true - p.ImportPath = sub - p.Root = ctxt.GOROOT - goto Found - } - } - all := ctxt.gopath() - for i, root := range all { - rootsrc := ctxt.joinPath(root, "src") - if sub, ok := ctxt.hasSubdir(rootsrc, p.Dir); ok && !inTestdata(sub) { - // We found a potential import path for dir, - // but check that using it wouldn't find something - // else first. - if ctxt.GOROOT != "" { - if dir := ctxt.joinPath(ctxt.GOROOT, "src", sub); ctxt.isDir(dir) { - p.ConflictDir = dir - goto Found - } - } - for _, earlyRoot := range all[:i] { - if dir := ctxt.joinPath(earlyRoot, "src", sub); ctxt.isDir(dir) { - p.ConflictDir = dir - goto Found - } - } - - // sub would not name some other directory instead of this one. - // Record it. - p.ImportPath = sub - p.Root = root - goto Found - } - } - // It's okay that we didn't find a root containing dir. - // Keep going with the information we have. - } else { - if strings.HasPrefix(path, "/") { - return p, fmt.Errorf("import %q: cannot import absolute path", path) - } - - // tried records the location of unsuccessful package lookups - var tried struct { - vendor []string - goroot string - gopath []string - } - gopath := ctxt.gopath() - - // Vendor directories get first chance to satisfy import. - if mode&IgnoreVendor == 0 && srcDir != "" { - searchVendor := func(root string, isGoroot bool) bool { - sub, ok := ctxt.hasSubdir(root, srcDir) - if !ok || !strings.HasPrefix(sub, "src/") || strings.Contains(sub, "/testdata/") { - return false - } - for { - vendor := ctxt.joinPath(root, sub, "vendor") - if ctxt.isDir(vendor) { - dir := ctxt.joinPath(vendor, path) - if ctxt.isDir(dir) && hasGoFiles(ctxt, dir) { - p.Dir = dir - p.ImportPath = strings.TrimPrefix(pathpkg.Join(sub, "vendor", path), "src/") - p.Goroot = isGoroot - p.Root = root - setPkga() // p.ImportPath changed - return true - } - tried.vendor = append(tried.vendor, dir) - } - i := strings.LastIndex(sub, "/") - if i < 0 { - break - } - sub = sub[:i] - } - return false - } - if searchVendor(ctxt.GOROOT, true) { - goto Found - } - for _, root := range gopath { - if searchVendor(root, false) { - goto Found - } - } - } - - // Determine directory from import path. - if ctxt.GOROOT != "" { - dir := ctxt.joinPath(ctxt.GOROOT, "src", path) - isDir := ctxt.isDir(dir) - binaryOnly = !isDir && mode&AllowBinary != 0 && pkga != "" && ctxt.isFile(ctxt.joinPath(ctxt.GOROOT, pkga)) - if isDir || binaryOnly { - p.Dir = dir - p.Goroot = true - p.Root = ctxt.GOROOT - goto Found - } - tried.goroot = dir - } - for _, root := range gopath { - dir := ctxt.joinPath(root, "src", path) - isDir := ctxt.isDir(dir) - binaryOnly = !isDir && mode&AllowBinary != 0 && pkga != "" && ctxt.isFile(ctxt.joinPath(root, pkga)) - if isDir || binaryOnly { - p.Dir = dir - p.Root = root - goto Found - } - tried.gopath = append(tried.gopath, dir) - } - - // package was not found - var paths []string - format := "\t%s (vendor tree)" - for _, dir := range tried.vendor { - paths = append(paths, fmt.Sprintf(format, dir)) - format = "\t%s" - } - if tried.goroot != "" { - paths = append(paths, fmt.Sprintf("\t%s (from $GOROOT)", tried.goroot)) - } else { - paths = append(paths, "\t($GOROOT not set)") - } - format = "\t%s (from $GOPATH)" - for _, dir := range tried.gopath { - paths = append(paths, fmt.Sprintf(format, dir)) - format = "\t%s" - } - if len(tried.gopath) == 0 { - paths = append(paths, "\t($GOPATH not set. For more details see: 'go help gopath')") - } - return p, fmt.Errorf("cannot find package %q in any of:\n%s", path, strings.Join(paths, "\n")) - } - -Found: - if p.Root != "" { - p.SrcRoot = ctxt.joinPath(p.Root, "src") - p.PkgRoot = ctxt.joinPath(p.Root, "pkg") - p.BinDir = ctxt.joinPath(p.Root, "bin") - if pkga != "" { - p.PkgTargetRoot = ctxt.joinPath(p.Root, pkgtargetroot) - p.PkgObj = ctxt.joinPath(p.Root, pkga) - } - } - - // If it's a local import path, by the time we get here, we still haven't checked - // that p.Dir directory exists. This is the right time to do that check. - // We can't do it earlier, because we want to gather partial information for the - // non-nil *Package returned when an error occurs. - // We need to do this before we return early on FindOnly flag. - if IsLocalImport(path) && !ctxt.isDir(p.Dir) { - // package was not found - return p, fmt.Errorf("cannot find package %q in:\n\t%s", path, p.Dir) - } - - if mode&FindOnly != 0 { - return p, pkgerr - } - if binaryOnly && (mode&AllowBinary) != 0 { - return p, pkgerr - } - - dirs, err := ctxt.readDir(p.Dir) - if err != nil { - return p, err - } - - var badGoError error - var Sfiles []string // files with ".S" (capital S) - var firstFile, firstCommentFile string - imported := make(map[string][]token.Position) - testImported := make(map[string][]token.Position) - xTestImported := make(map[string][]token.Position) - allTags := make(map[string]bool) - fset := token.NewFileSet() - for _, d := range dirs { - if d.IsDir() { - continue - } - - name := d.Name() - ext := nameExt(name) - - badFile := func(err error) { - if badGoError == nil { - badGoError = err - } - p.InvalidGoFiles = append(p.InvalidGoFiles, name) - } - - match, data, filename, err := ctxt.matchFile(p.Dir, name, allTags, &p.BinaryOnly) - if err != nil { - badFile(err) - continue - } - if !match { - if ext == ".go" { - p.IgnoredGoFiles = append(p.IgnoredGoFiles, name) - } - continue - } - - // Going to save the file. For non-Go files, can stop here. - switch ext { - case ".c": - p.CFiles = append(p.CFiles, name) - continue - case ".cc", ".cpp", ".cxx": - p.CXXFiles = append(p.CXXFiles, name) - continue - case ".m": - p.MFiles = append(p.MFiles, name) - continue - case ".h", ".hh", ".hpp", ".hxx": - p.HFiles = append(p.HFiles, name) - continue - case ".f", ".F", ".for", ".f90": - p.FFiles = append(p.FFiles, name) - continue - case ".s": - p.SFiles = append(p.SFiles, name) - continue - case ".S": - Sfiles = append(Sfiles, name) - continue - case ".swig": - p.SwigFiles = append(p.SwigFiles, name) - continue - case ".swigcxx": - p.SwigCXXFiles = append(p.SwigCXXFiles, name) - continue - case ".syso": - // binary objects to add to package archive - // Likely of the form foo_windows.syso, but - // the name was vetted above with goodOSArchFile. - p.SysoFiles = append(p.SysoFiles, name) - continue - } - - pf, err := parser.ParseFile(fset, filename, data, parser.ImportsOnly|parser.ParseComments) - if err != nil { - badFile(err) - continue - } - - pkg := pf.Name.Name - if pkg == "documentation" { - p.IgnoredGoFiles = append(p.IgnoredGoFiles, name) - continue - } - - isTest := strings.HasSuffix(name, "_test.go") - isXTest := false - if isTest && strings.HasSuffix(pkg, "_test") { - isXTest = true - pkg = pkg[:len(pkg)-len("_test")] - } - - if p.Name == "" { - p.Name = pkg - firstFile = name - } else if pkg != p.Name { - badFile(&MultiplePackageError{ - Dir: p.Dir, - Packages: []string{p.Name, pkg}, - Files: []string{firstFile, name}, - }) - p.InvalidGoFiles = append(p.InvalidGoFiles, name) - } - if pf.Doc != nil && p.Doc == "" { - p.Doc = doc.Synopsis(pf.Doc.Text()) - } - - if mode&ImportComment != 0 { - qcom, line := findImportComment(data) - if line != 0 { - com, err := strconv.Unquote(qcom) - if err != nil { - badFile(fmt.Errorf("%s:%d: cannot parse import comment", filename, line)) - } else if p.ImportComment == "" { - p.ImportComment = com - firstCommentFile = name - } else if p.ImportComment != com { - badFile(fmt.Errorf("found import comments %q (%s) and %q (%s) in %s", p.ImportComment, firstCommentFile, com, name, p.Dir)) - } - } - } - - // Record imports and information about cgo. - isCgo := false - for _, decl := range pf.Decls { - d, ok := decl.(*ast.GenDecl) - if !ok { - continue - } - for _, dspec := range d.Specs { - spec, ok := dspec.(*ast.ImportSpec) - if !ok { - continue - } - quoted := spec.Path.Value - path, err := strconv.Unquote(quoted) - if err != nil { - log.Panicf("%s: parser returned invalid quoted string: <%s>", filename, quoted) - } - if isXTest { - xTestImported[path] = append(xTestImported[path], fset.Position(spec.Pos())) - } else if isTest { - testImported[path] = append(testImported[path], fset.Position(spec.Pos())) - } else { - imported[path] = append(imported[path], fset.Position(spec.Pos())) - } - if path == "C" { - if isTest { - badFile(fmt.Errorf("use of cgo in test %s not supported", filename)) - } else { - cg := spec.Doc - if cg == nil && len(d.Specs) == 1 { - cg = d.Doc - } - if cg != nil { - if err := ctxt.saveCgo(filename, p, cg); err != nil { - badFile(err) - } - } - isCgo = true - } - } - } - } - if isCgo { - allTags["cgo"] = true - if ctxt.CgoEnabled { - p.CgoFiles = append(p.CgoFiles, name) - } else { - p.IgnoredGoFiles = append(p.IgnoredGoFiles, name) - } - } else if isXTest { - p.XTestGoFiles = append(p.XTestGoFiles, name) - } else if isTest { - p.TestGoFiles = append(p.TestGoFiles, name) - } else { - p.GoFiles = append(p.GoFiles, name) - } - } - if badGoError != nil { - return p, badGoError - } - if len(p.GoFiles)+len(p.CgoFiles)+len(p.TestGoFiles)+len(p.XTestGoFiles) == 0 { - return p, &NoGoError{p.Dir} - } - - for tag := range allTags { - p.AllTags = append(p.AllTags, tag) - } - sort.Strings(p.AllTags) - - p.Imports, p.ImportPos = cleanImports(imported) - p.TestImports, p.TestImportPos = cleanImports(testImported) - p.XTestImports, p.XTestImportPos = cleanImports(xTestImported) - - // add the .S files only if we are using cgo - // (which means gcc will compile them). - // The standard assemblers expect .s files. - if len(p.CgoFiles) > 0 { - p.SFiles = append(p.SFiles, Sfiles...) - sort.Strings(p.SFiles) - } - - return p, pkgerr -} - -// hasGoFiles reports whether dir contains any files with names ending in .go. -// For a vendor check we must exclude directories that contain no .go files. -// Otherwise it is not possible to vendor just a/b/c and still import the -// non-vendored a/b. See golang.org/issue/13832. -func hasGoFiles(ctxt *Context, dir string) bool { - ents, _ := ctxt.readDir(dir) - for _, ent := range ents { - if !ent.IsDir() && strings.HasSuffix(ent.Name(), ".go") { - return true - } - } - return false -} - -func findImportComment(data []byte) (s string, line int) { - // expect keyword package - word, data := parseWord(data) - if string(word) != "package" { - return "", 0 - } - - // expect package name - _, data = parseWord(data) - - // now ready for import comment, a // or /* */ comment - // beginning and ending on the current line. - for len(data) > 0 && (data[0] == ' ' || data[0] == '\t' || data[0] == '\r') { - data = data[1:] - } - - var comment []byte - switch { - case bytes.HasPrefix(data, slashSlash): - i := bytes.Index(data, newline) - if i < 0 { - i = len(data) - } - comment = data[2:i] - case bytes.HasPrefix(data, slashStar): - data = data[2:] - i := bytes.Index(data, starSlash) - if i < 0 { - // malformed comment - return "", 0 - } - comment = data[:i] - if bytes.Contains(comment, newline) { - return "", 0 - } - } - comment = bytes.TrimSpace(comment) - - // split comment into `import`, `"pkg"` - word, arg := parseWord(comment) - if string(word) != "import" { - return "", 0 - } - - line = 1 + bytes.Count(data[:cap(data)-cap(arg)], newline) - return strings.TrimSpace(string(arg)), line -} - -var ( - slashSlash = []byte("//") - slashStar = []byte("/*") - starSlash = []byte("*/") - newline = []byte("\n") -) - -// skipSpaceOrComment returns data with any leading spaces or comments removed. -func skipSpaceOrComment(data []byte) []byte { - for len(data) > 0 { - switch data[0] { - case ' ', '\t', '\r', '\n': - data = data[1:] - continue - case '/': - if bytes.HasPrefix(data, slashSlash) { - i := bytes.Index(data, newline) - if i < 0 { - return nil - } - data = data[i+1:] - continue - } - if bytes.HasPrefix(data, slashStar) { - data = data[2:] - i := bytes.Index(data, starSlash) - if i < 0 { - return nil - } - data = data[i+2:] - continue - } - } - break - } - return data -} - -// parseWord skips any leading spaces or comments in data -// and then parses the beginning of data as an identifier or keyword, -// returning that word and what remains after the word. -func parseWord(data []byte) (word, rest []byte) { - data = skipSpaceOrComment(data) - - // Parse past leading word characters. - rest = data - for { - r, size := utf8.DecodeRune(rest) - if unicode.IsLetter(r) || '0' <= r && r <= '9' || r == '_' { - rest = rest[size:] - continue - } - break - } - - word = data[:len(data)-len(rest)] - if len(word) == 0 { - return nil, nil - } - - return word, rest -} - -// MatchFile reports whether the file with the given name in the given directory -// matches the context and would be included in a Package created by ImportDir -// of that directory. -// -// MatchFile considers the name of the file and may use ctxt.OpenFile to -// read some or all of the file's content. -func (ctxt *Context) MatchFile(dir, name string) (match bool, err error) { - match, _, _, err = ctxt.matchFile(dir, name, nil, nil) - return -} - -// matchFile determines whether the file with the given name in the given directory -// should be included in the package being constructed. -// It returns the data read from the file. -// If name denotes a Go program, matchFile reads until the end of the -// imports (and returns that data) even though it only considers text -// until the first non-comment. -// If allTags is non-nil, matchFile records any encountered build tag -// by setting allTags[tag] = true. -func (ctxt *Context) matchFile(dir, name string, allTags map[string]bool, binaryOnly *bool) (match bool, data []byte, filename string, err error) { - if strings.HasPrefix(name, "_") || - strings.HasPrefix(name, ".") { - return - } - - i := strings.LastIndex(name, ".") - if i < 0 { - i = len(name) - } - ext := name[i:] - - if !ctxt.goodOSArchFile(name, allTags) && !ctxt.UseAllFiles { - return - } - - switch ext { - case ".go", ".c", ".cc", ".cxx", ".cpp", ".m", ".s", ".h", ".hh", ".hpp", ".hxx", ".f", ".F", ".f90", ".S", ".swig", ".swigcxx": - // tentatively okay - read to make sure - case ".syso": - // binary, no reading - match = true - return - default: - // skip - return - } - - filename = ctxt.joinPath(dir, name) - f, err := ctxt.openFile(filename) - if err != nil { - return - } - - if strings.HasSuffix(filename, ".go") { - data, err = readImports(f, false, nil) - if strings.HasSuffix(filename, "_test.go") { - binaryOnly = nil // ignore //go:binary-only-package comments in _test.go files - } - } else { - binaryOnly = nil // ignore //go:binary-only-package comments in non-Go sources - data, err = readComments(f) - } - f.Close() - if err != nil { - err = fmt.Errorf("read %s: %v", filename, err) - return - } - - // Look for +build comments to accept or reject the file. - var sawBinaryOnly bool - if !ctxt.shouldBuild(data, allTags, &sawBinaryOnly) && !ctxt.UseAllFiles { - return - } - - if binaryOnly != nil && sawBinaryOnly { - *binaryOnly = true - } - match = true - return -} - -func cleanImports(m map[string][]token.Position) ([]string, map[string][]token.Position) { - all := make([]string, 0, len(m)) - for path := range m { - all = append(all, path) - } - sort.Strings(all) - return all, m -} - -// Import is shorthand for Default.Import. -func Import(path, srcDir string, mode ImportMode) (*Package, error) { - return Default.Import(path, srcDir, mode) -} - -// ImportDir is shorthand for Default.ImportDir. -func ImportDir(dir string, mode ImportMode) (*Package, error) { - return Default.ImportDir(dir, mode) -} - -var slashslash = []byte("//") - -// Special comment denoting a binary-only package. -// See https://golang.org/design/2775-binary-only-packages -// for more about the design of binary-only packages. -var binaryOnlyComment = []byte("//go:binary-only-package") - -// shouldBuild reports whether it is okay to use this file, -// The rule is that in the file's leading run of // comments -// and blank lines, which must be followed by a blank line -// (to avoid including a Go package clause doc comment), -// lines beginning with '// +build' are taken as build directives. -// -// The file is accepted only if each such line lists something -// matching the file. For example: -// -// // +build windows linux -// -// marks the file as applicable only on Windows and Linux. -// -// If shouldBuild finds a //go:binary-only-package comment in the file, -// it sets *binaryOnly to true. Otherwise it does not change *binaryOnly. -// -func (ctxt *Context) shouldBuild(content []byte, allTags map[string]bool, binaryOnly *bool) bool { - sawBinaryOnly := false - - // Pass 1. Identify leading run of // comments and blank lines, - // which must be followed by a blank line. - end := 0 - p := content - for len(p) > 0 { - line := p - if i := bytes.IndexByte(line, '\n'); i >= 0 { - line, p = line[:i], p[i+1:] - } else { - p = p[len(p):] - } - line = bytes.TrimSpace(line) - if len(line) == 0 { // Blank line - end = len(content) - len(p) - continue - } - if !bytes.HasPrefix(line, slashslash) { // Not comment line - break - } - } - content = content[:end] - - // Pass 2. Process each line in the run. - p = content - hasReq := len(ctxt.RequiredTags) > 0 - allok := !hasReq - for len(p) > 0 { - line := p - if i := bytes.IndexByte(line, '\n'); i >= 0 { - line, p = line[:i], p[i+1:] - } else { - p = p[len(p):] - } - line = bytes.TrimSpace(line) - if bytes.HasPrefix(line, slashslash) { - if bytes.Equal(line, binaryOnlyComment) { - sawBinaryOnly = true - } - line = bytes.TrimSpace(line[len(slashslash):]) - if len(line) > 0 && line[0] == '+' { - // Looks like a comment +line. - f := strings.Fields(string(line)) - if f[0] == "+build" { - ok := false - for _, tok := range f[1:] { - tags := map[string]bool{} - if ctxt.match(tok, tags) { - if containsAll(tags, ctxt.RequiredTags) { - ok = true - } - } - merge(allTags, tags) - } - if !hasReq { - if !ok { - allok = false - } - } else { - if ok { - allok = true - } - } - } - } - } - } - - if binaryOnly != nil && sawBinaryOnly { - *binaryOnly = true - } - - return allok -} - -func merge(to, from map[string]bool) { - if to == nil { - return - } - for k, v := range from { - to[k] = v - } -} - -func containsAll(m map[string]bool, vals []string) bool { - // yes this is N^2, but N is small. - for _, v := range vals { - if !m[v] { - return false - } - } - return true -} - -func contains(list []string, s string) bool { - for _, l := range list { - if l == s { - return true - } - } - return false -} - -// saveCgo saves the information from the #cgo lines in the import "C" comment. -// These lines set CFLAGS, CPPFLAGS, CXXFLAGS and LDFLAGS and pkg-config directives -// that affect the way cgo's C code is built. -func (ctxt *Context) saveCgo(filename string, di *Package, cg *ast.CommentGroup) error { - text := cg.Text() - for _, line := range strings.Split(text, "\n") { - orig := line - - // Line is - // #cgo [GOOS/GOARCH...] LDFLAGS: stuff - // - line = strings.TrimSpace(line) - if len(line) < 5 || line[:4] != "#cgo" || (line[4] != ' ' && line[4] != '\t') { - continue - } - - // Split at colon. - line = strings.TrimSpace(line[4:]) - i := strings.Index(line, ":") - if i < 0 { - return fmt.Errorf("%s: invalid #cgo line: %s", filename, orig) - } - line, argstr := line[:i], line[i+1:] - - // Parse GOOS/GOARCH stuff. - f := strings.Fields(line) - if len(f) < 1 { - return fmt.Errorf("%s: invalid #cgo line: %s", filename, orig) - } - - cond, verb := f[:len(f)-1], f[len(f)-1] - if len(cond) > 0 { - ok := false - for _, c := range cond { - if ctxt.match(c, nil) { - ok = true - break - } - } - if !ok { - continue - } - } - - args, err := splitQuoted(argstr) - if err != nil { - return fmt.Errorf("%s: invalid #cgo line: %s", filename, orig) - } - var ok bool - for i, arg := range args { - if arg, ok = expandSrcDir(arg, di.Dir); !ok { - return fmt.Errorf("%s: malformed #cgo argument: %s", filename, arg) - } - args[i] = arg - } - - switch verb { - case "CFLAGS", "CPPFLAGS", "CXXFLAGS", "FFLAGS", "LDFLAGS": - // Change relative paths to absolute. - ctxt.makePathsAbsolute(args, di.Dir) - } - - switch verb { - case "CFLAGS": - di.CgoCFLAGS = append(di.CgoCFLAGS, args...) - case "CPPFLAGS": - di.CgoCPPFLAGS = append(di.CgoCPPFLAGS, args...) - case "CXXFLAGS": - di.CgoCXXFLAGS = append(di.CgoCXXFLAGS, args...) - case "FFLAGS": - di.CgoFFLAGS = append(di.CgoFFLAGS, args...) - case "LDFLAGS": - di.CgoLDFLAGS = append(di.CgoLDFLAGS, args...) - case "pkg-config": - di.CgoPkgConfig = append(di.CgoPkgConfig, args...) - default: - return fmt.Errorf("%s: invalid #cgo verb: %s", filename, orig) - } - } - return nil -} - -// expandSrcDir expands any occurrence of ${SRCDIR}, making sure -// the result is safe for the shell. -func expandSrcDir(str string, srcdir string) (string, bool) { - // "\" delimited paths cause safeCgoName to fail - // so convert native paths with a different delimiter - // to "/" before starting (eg: on windows). - srcdir = filepath.ToSlash(srcdir) - - chunks := strings.Split(str, "${SRCDIR}") - if len(chunks) < 2 { - return str, safeCgoName(str) - } - ok := true - for _, chunk := range chunks { - ok = ok && (chunk == "" || safeCgoName(chunk)) - } - ok = ok && (srcdir == "" || safeCgoName(srcdir)) - res := strings.Join(chunks, srcdir) - return res, ok && res != "" -} - -// makePathsAbsolute looks for compiler options that take paths and -// makes them absolute. We do this because through the 1.8 release we -// ran the compiler in the package directory, so any relative -I or -L -// options would be relative to that directory. In 1.9 we changed to -// running the compiler in the build directory, to get consistent -// build results (issue #19964). To keep builds working, we change any -// relative -I or -L options to be absolute. -// -// Using filepath.IsAbs and filepath.Join here means the results will be -// different on different systems, but that's OK: -I and -L options are -// inherently system-dependent. -func (ctxt *Context) makePathsAbsolute(args []string, srcDir string) { - nextPath := false - for i, arg := range args { - if nextPath { - if !filepath.IsAbs(arg) { - args[i] = filepath.Join(srcDir, arg) - } - nextPath = false - } else if strings.HasPrefix(arg, "-I") || strings.HasPrefix(arg, "-L") { - if len(arg) == 2 { - nextPath = true - } else { - if !filepath.IsAbs(arg[2:]) { - args[i] = arg[:2] + filepath.Join(srcDir, arg[2:]) - } - } - } - } -} - -// NOTE: $ is not safe for the shell, but it is allowed here because of linker options like -Wl,$ORIGIN. -// We never pass these arguments to a shell (just to programs we construct argv for), so this should be okay. -// See golang.org/issue/6038. -// The @ is for OS X. See golang.org/issue/13720. -// The % is for Jenkins. See golang.org/issue/16959. -const safeString = "+-.,/0123456789=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz:$@% " - -func safeCgoName(s string) bool { - if s == "" { - return false - } - for i := 0; i < len(s); i++ { - if c := s[i]; c < utf8.RuneSelf && strings.IndexByte(safeString, c) < 0 { - return false - } - } - return true -} - -// splitQuoted splits the string s around each instance of one or more consecutive -// white space characters while taking into account quotes and escaping, and -// returns an array of substrings of s or an empty list if s contains only white space. -// Single quotes and double quotes are recognized to prevent splitting within the -// quoted region, and are removed from the resulting substrings. If a quote in s -// isn't closed err will be set and r will have the unclosed argument as the -// last element. The backslash is used for escaping. -// -// For example, the following string: -// -// a b:"c d" 'e''f' "g\"" -// -// Would be parsed as: -// -// []string{"a", "b:c d", "ef", `g"`} -// -func splitQuoted(s string) (r []string, err error) { - var args []string - arg := make([]rune, len(s)) - escaped := false - quoted := false - quote := '\x00' - i := 0 - for _, rune := range s { - switch { - case escaped: - escaped = false - case rune == '\\': - escaped = true - continue - case quote != '\x00': - if rune == quote { - quote = '\x00' - continue - } - case rune == '"' || rune == '\'': - quoted = true - quote = rune - continue - case unicode.IsSpace(rune): - if quoted || i > 0 { - quoted = false - args = append(args, string(arg[:i])) - i = 0 - } - continue - } - arg[i] = rune - i++ - } - if quoted || i > 0 { - args = append(args, string(arg[:i])) - } - if quote != 0 { - err = errors.New("unclosed quote") - } else if escaped { - err = errors.New("unfinished escaping") - } - return args, err -} - -// match reports whether the name is one of: -// -// $GOOS -// $GOARCH -// cgo (if cgo is enabled) -// !cgo (if cgo is disabled) -// ctxt.Compiler -// !ctxt.Compiler -// tag (if tag is listed in ctxt.BuildTags or ctxt.ReleaseTags) -// !tag (if tag is not listed in ctxt.BuildTags or ctxt.ReleaseTags) -// a comma-separated list of any of these -// -func (ctxt *Context) match(name string, allTags map[string]bool) bool { - if name == "" { - if allTags != nil { - allTags[name] = true - } - return false - } - if i := strings.Index(name, ","); i >= 0 { - // comma-separated list - ok1 := ctxt.match(name[:i], allTags) - ok2 := ctxt.match(name[i+1:], allTags) - return ok1 && ok2 - } - if strings.HasPrefix(name, "!!") { // bad syntax, reject always - return false - } - if strings.HasPrefix(name, "!") { // negation - return len(name) > 1 && !ctxt.match(name[1:], allTags) - } - - if allTags != nil { - allTags[name] = true - } - - // Tags must be letters, digits, underscores or dots. - // Unlike in Go identifiers, all digits are fine (e.g., "386"). - for _, c := range name { - if !unicode.IsLetter(c) && !unicode.IsDigit(c) && c != '_' && c != '.' { - return false - } - } - - // special tags - if ctxt.CgoEnabled && name == "cgo" { - return true - } - if name == ctxt.GOOS || name == ctxt.GOARCH || name == ctxt.Compiler { - return true - } - if ctxt.GOOS == "android" && name == "linux" { - return true - } - - // other tags - for _, tag := range ctxt.BuildTags { - if tag == name { - return true - } - } - for _, tag := range ctxt.ReleaseTags { - if tag == name { - return true - } - } - - return false -} - -// goodOSArchFile returns false if the name contains a $GOOS or $GOARCH -// suffix which does not match the current system. -// The recognized name formats are: -// -// name_$(GOOS).* -// name_$(GOARCH).* -// name_$(GOOS)_$(GOARCH).* -// name_$(GOOS)_test.* -// name_$(GOARCH)_test.* -// name_$(GOOS)_$(GOARCH)_test.* -// -// An exception: if GOOS=android, then files with GOOS=linux are also matched. -func (ctxt *Context) goodOSArchFile(name string, allTags map[string]bool) bool { - if dot := strings.Index(name, "."); dot != -1 { - name = name[:dot] - } - - // Before Go 1.4, a file called "linux.go" would be equivalent to having a - // build tag "linux" in that file. For Go 1.4 and beyond, we require this - // auto-tagging to apply only to files with a non-empty prefix, so - // "foo_linux.go" is tagged but "linux.go" is not. This allows new operating - // systems, such as android, to arrive without breaking existing code with - // innocuous source code in "android.go". The easiest fix: cut everything - // in the name before the initial _. - i := strings.Index(name, "_") - if i < 0 { - return true - } - name = name[i:] // ignore everything before first _ - - l := strings.Split(name, "_") - if n := len(l); n > 0 && l[n-1] == "test" { - l = l[:n-1] - } - n := len(l) - if n >= 2 && knownOS[l[n-2]] && knownArch[l[n-1]] { - if allTags != nil { - allTags[l[n-2]] = true - allTags[l[n-1]] = true - } - if l[n-1] != ctxt.GOARCH { - return false - } - if ctxt.GOOS == "android" && l[n-2] == "linux" { - return true - } - return l[n-2] == ctxt.GOOS - } - if n >= 1 && knownOS[l[n-1]] { - if allTags != nil { - allTags[l[n-1]] = true - } - if ctxt.GOOS == "android" && l[n-1] == "linux" { - return true - } - return l[n-1] == ctxt.GOOS - } - if n >= 1 && knownArch[l[n-1]] { - if allTags != nil { - allTags[l[n-1]] = true - } - return l[n-1] == ctxt.GOARCH - } - return true -} - -var knownOS = make(map[string]bool) -var knownArch = make(map[string]bool) - -func init() { - for _, v := range strings.Fields(goosList) { - knownOS[v] = true - } - for _, v := range strings.Fields(goarchList) { - knownArch[v] = true - } -} - -// ToolDir is the directory containing build tools. -var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) - -// IsLocalImport reports whether the import path is -// a local import path, like ".", "..", "./foo", or "../foo". -func IsLocalImport(path string) bool { - return path == "." || path == ".." || - strings.HasPrefix(path, "./") || strings.HasPrefix(path, "../") -} - -// ArchChar returns "?" and an error. -// In earlier versions of Go, the returned string was used to derive -// the compiler and linker tool names, the default object file suffix, -// and the default linker output name. As of Go 1.5, those strings -// no longer vary by architecture; they are compile, link, .o, and a.out, respectively. -func ArchChar(goarch string) (string, error) { - return "?", errors.New("architecture letter no longer used") -} diff --git a/vendor/github.com/magefile/mage/build/build_test.go b/vendor/github.com/magefile/mage/build/build_test.go deleted file mode 100644 index 89b2c09..0000000 --- a/vendor/github.com/magefile/mage/build/build_test.go +++ /dev/null @@ -1,446 +0,0 @@ -// 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 build - -import ( - "io" - "os" - "path/filepath" - "reflect" - "runtime" - "strings" - "testing" -) - -func TestMatch(t *testing.T) { - ctxt := Default - what := "default" - match := func(tag string, want map[string]bool) { - m := make(map[string]bool) - if !ctxt.match(tag, m) { - t.Errorf("%s context should match %s, does not", what, tag) - } - if !reflect.DeepEqual(m, want) { - t.Errorf("%s tags = %v, want %v", tag, m, want) - } - } - nomatch := func(tag string, want map[string]bool) { - m := make(map[string]bool) - if ctxt.match(tag, m) { - t.Errorf("%s context should NOT match %s, does", what, tag) - } - if !reflect.DeepEqual(m, want) { - t.Errorf("%s tags = %v, want %v", tag, m, want) - } - } - - match(runtime.GOOS+","+runtime.GOARCH, map[string]bool{runtime.GOOS: true, runtime.GOARCH: true}) - match(runtime.GOOS+","+runtime.GOARCH+",!foo", map[string]bool{runtime.GOOS: true, runtime.GOARCH: true, "foo": true}) - nomatch(runtime.GOOS+","+runtime.GOARCH+",foo", map[string]bool{runtime.GOOS: true, runtime.GOARCH: true, "foo": true}) - - what = "modified" - ctxt.BuildTags = []string{"foo"} - match(runtime.GOOS+","+runtime.GOARCH, map[string]bool{runtime.GOOS: true, runtime.GOARCH: true}) - match(runtime.GOOS+","+runtime.GOARCH+",foo", map[string]bool{runtime.GOOS: true, runtime.GOARCH: true, "foo": true}) - nomatch(runtime.GOOS+","+runtime.GOARCH+",!foo", map[string]bool{runtime.GOOS: true, runtime.GOARCH: true, "foo": true}) - match(runtime.GOOS+","+runtime.GOARCH+",!bar", map[string]bool{runtime.GOOS: true, runtime.GOARCH: true, "bar": true}) - nomatch(runtime.GOOS+","+runtime.GOARCH+",bar", map[string]bool{runtime.GOOS: true, runtime.GOARCH: true, "bar": true}) - nomatch("!", map[string]bool{}) -} - -func TestDotSlashImport(t *testing.T) { - p, err := ImportDir("testdata/other", 0) - if err != nil { - t.Fatal(err) - } - if len(p.Imports) != 1 || p.Imports[0] != "./file" { - t.Fatalf("testdata/other: Imports=%v, want [./file]", p.Imports) - } - - p1, err := Import("./file", "testdata/other", 0) - if err != nil { - t.Fatal(err) - } - if p1.Name != "file" { - t.Fatalf("./file: Name=%q, want %q", p1.Name, "file") - } - dir := filepath.Clean("testdata/other/file") // Clean to use \ on Windows - if p1.Dir != dir { - t.Fatalf("./file: Dir=%q, want %q", p1.Name, dir) - } -} - -func TestEmptyImport(t *testing.T) { - p, err := Import("", Default.GOROOT, FindOnly) - if err == nil { - t.Fatal(`Import("") returned nil error.`) - } - if p == nil { - t.Fatal(`Import("") returned nil package.`) - } - if p.ImportPath != "" { - t.Fatalf("ImportPath=%q, want %q.", p.ImportPath, "") - } -} - -func TestEmptyFolderImport(t *testing.T) { - _, err := Import(".", "testdata/empty", 0) - if _, ok := err.(*NoGoError); !ok { - t.Fatal(`Import("testdata/empty") did not return NoGoError.`) - } -} - -func TestMultiplePackageImport(t *testing.T) { - _, err := Import(".", "testdata/multi", 0) - mpe, ok := err.(*MultiplePackageError) - if !ok { - t.Fatal(`Import("testdata/multi") did not return MultiplePackageError.`) - } - want := &MultiplePackageError{ - Dir: filepath.FromSlash("testdata/multi"), - Packages: []string{"main", "test_package"}, - Files: []string{"file.go", "file_appengine.go"}, - } - if !reflect.DeepEqual(mpe, want) { - t.Errorf("got %#v; want %#v", mpe, want) - } -} - -func TestLocalDirectory(t *testing.T) { - if runtime.GOOS == "darwin" { - switch runtime.GOARCH { - case "arm", "arm64": - t.Skipf("skipping on %s/%s, no valid GOROOT", runtime.GOOS, runtime.GOARCH) - } - } - - cwd, err := os.Getwd() - if err != nil { - t.Fatal(err) - } - - p, err := ImportDir(cwd, 0) - if err != nil { - t.Fatal(err) - } - if p.ImportPath != "github.com/magefile/mage/build" { - t.Fatalf("ImportPath=%q, want %q", p.ImportPath, "github.com/magefile/mage/build") - } -} - -func TestShouldBuild(t *testing.T) { - const file1 = "// +build tag1\n\n" + - "package main\n" - want1 := map[string]bool{"tag1": true} - - const file2 = "// +build cgo\n\n" + - "// This package implements parsing of tags like\n" + - "// +build tag1\n" + - "package build" - want2 := map[string]bool{"cgo": true} - - const file3 = "// Copyright The Go Authors.\n\n" + - "package build\n\n" + - "// shouldBuild checks tags given by lines of the form\n" + - "// +build tag\n" + - "func shouldBuild(content []byte)\n" - want3 := map[string]bool{} - - ctx := &Context{BuildTags: []string{"tag1"}} - m := map[string]bool{} - if !ctx.shouldBuild([]byte(file1), m, nil) { - t.Errorf("shouldBuild(file1) = false, want true") - } - if !reflect.DeepEqual(m, want1) { - t.Errorf("shouldBuild(file1) tags = %v, want %v", m, want1) - } - - m = map[string]bool{} - if ctx.shouldBuild([]byte(file2), m, nil) { - t.Errorf("shouldBuild(file2) = true, want false") - } - if !reflect.DeepEqual(m, want2) { - t.Errorf("shouldBuild(file2) tags = %v, want %v", m, want2) - } - - m = map[string]bool{} - ctx = &Context{BuildTags: nil} - if !ctx.shouldBuild([]byte(file3), m, nil) { - t.Errorf("shouldBuild(file3) = false, want true") - } - if !reflect.DeepEqual(m, want3) { - t.Errorf("shouldBuild(file3) tags = %v, want %v", m, want3) - } -} - -func TestRequiredTags(t *testing.T) { - tests := []struct { - name string - file string - should bool - }{ - { - "no req tag", - "package main", - false, - }, - { - "has req tag", - `// +build req - - package main`, - true, - }, - { - "OR with req", - `// +build no req - - package main`, - true, - }, - } - - ctx := &Context{ - BuildTags: []string{"req"}, - RequiredTags: []string{"req"}, - } - for _, tst := range tests { - t.Run(tst.name, func(t *testing.T) { - if tst.should != ctx.shouldBuild([]byte(tst.file), nil, nil) { - t.Errorf("shouldBuild = %v, want %v", !tst.should, tst.should) - } - }) - } -} - -type readNopCloser struct { - io.Reader -} - -func (r readNopCloser) Close() error { - return nil -} - -var ( - ctxtP9 = Context{GOARCH: "arm", GOOS: "plan9"} - ctxtAndroid = Context{GOARCH: "arm", GOOS: "android"} -) - -var matchFileTests = []struct { - ctxt Context - name string - data string - match bool -}{ - {ctxtP9, "foo_arm.go", "", true}, - {ctxtP9, "foo1_arm.go", "// +build linux\n\npackage main\n", false}, - {ctxtP9, "foo_darwin.go", "", false}, - {ctxtP9, "foo.go", "", true}, - {ctxtP9, "foo1.go", "// +build linux\n\npackage main\n", false}, - {ctxtP9, "foo.badsuffix", "", false}, - {ctxtAndroid, "foo_linux.go", "", true}, - {ctxtAndroid, "foo_android.go", "", true}, - {ctxtAndroid, "foo_plan9.go", "", false}, - {ctxtAndroid, "android.go", "", true}, - {ctxtAndroid, "plan9.go", "", true}, - {ctxtAndroid, "plan9_test.go", "", true}, - {ctxtAndroid, "arm.s", "", true}, - {ctxtAndroid, "amd64.s", "", true}, -} - -func TestMatchFile(t *testing.T) { - for _, tt := range matchFileTests { - ctxt := tt.ctxt - ctxt.OpenFile = func(path string) (r io.ReadCloser, err error) { - if path != "x+"+tt.name { - t.Fatalf("OpenFile asked for %q, expected %q", path, "x+"+tt.name) - } - return &readNopCloser{strings.NewReader(tt.data)}, nil - } - ctxt.JoinPath = func(elem ...string) string { - return strings.Join(elem, "+") - } - match, err := ctxt.MatchFile("x", tt.name) - if match != tt.match || err != nil { - t.Fatalf("MatchFile(%q) = %v, %v, want %v, nil", tt.name, match, err, tt.match) - } - } -} - -func TestImportCmd(t *testing.T) { - if runtime.GOOS == "darwin" { - switch runtime.GOARCH { - case "arm", "arm64": - t.Skipf("skipping on %s/%s, no valid GOROOT", runtime.GOOS, runtime.GOARCH) - } - } - - p, err := Import("cmd/internal/objfile", "", 0) - if err != nil { - t.Fatal(err) - } - if !strings.HasSuffix(filepath.ToSlash(p.Dir), "src/cmd/internal/objfile") { - t.Fatalf("Import cmd/internal/objfile returned Dir=%q, want %q", filepath.ToSlash(p.Dir), ".../src/cmd/internal/objfile") - } -} - -var ( - expandSrcDirPath = filepath.Join(string(filepath.Separator)+"projects", "src", "add") -) - -var expandSrcDirTests = []struct { - input, expected string -}{ - {"-L ${SRCDIR}/libs -ladd", "-L /projects/src/add/libs -ladd"}, - {"${SRCDIR}/add_linux_386.a -pthread -lstdc++", "/projects/src/add/add_linux_386.a -pthread -lstdc++"}, - {"Nothing to expand here!", "Nothing to expand here!"}, - {"$", "$"}, - {"$$", "$$"}, - {"${", "${"}, - {"$}", "$}"}, - {"$FOO ${BAR}", "$FOO ${BAR}"}, - {"Find me the $SRCDIRECTORY.", "Find me the $SRCDIRECTORY."}, - {"$SRCDIR is missing braces", "$SRCDIR is missing braces"}, -} - -func TestExpandSrcDir(t *testing.T) { - for _, test := range expandSrcDirTests { - output, _ := expandSrcDir(test.input, expandSrcDirPath) - if output != test.expected { - t.Errorf("%q expands to %q with SRCDIR=%q when %q is expected", test.input, output, expandSrcDirPath, test.expected) - } else { - t.Logf("%q expands to %q with SRCDIR=%q", test.input, output, expandSrcDirPath) - } - } -} - -func TestShellSafety(t *testing.T) { - tests := []struct { - input, srcdir, expected string - result bool - }{ - {"-I${SRCDIR}/../include", "/projects/src/issue 11868", "-I/projects/src/issue 11868/../include", true}, - {"-I${SRCDIR}", "wtf$@%", "-Iwtf$@%", true}, - {"-X${SRCDIR}/1,${SRCDIR}/2", "/projects/src/issue 11868", "-X/projects/src/issue 11868/1,/projects/src/issue 11868/2", true}, - {"-I/tmp -I/tmp", "/tmp2", "-I/tmp -I/tmp", true}, - {"-I/tmp", "/tmp/[0]", "-I/tmp", true}, - {"-I${SRCDIR}/dir", "/tmp/[0]", "-I/tmp/[0]/dir", false}, - {"-I${SRCDIR}/dir", "/tmp/go go", "-I/tmp/go go/dir", true}, - {"-I${SRCDIR}/dir dir", "/tmp/go", "-I/tmp/go/dir dir", true}, - } - for _, test := range tests { - output, ok := expandSrcDir(test.input, test.srcdir) - if ok != test.result { - t.Errorf("Expected %t while %q expands to %q with SRCDIR=%q; got %t", test.result, test.input, output, test.srcdir, ok) - } - if output != test.expected { - t.Errorf("Expected %q while %q expands with SRCDIR=%q; got %q", test.expected, test.input, test.srcdir, output) - } - } -} - -// Want to get a "cannot find package" error when directory for package does not exist. -// There should be valid partial information in the returned non-nil *Package. -func TestImportDirNotExist(t *testing.T) { - MustHaveGoBuild(t) // really must just have source - ctxt := Default - ctxt.GOPATH = "" - - tests := []struct { - label string - path, srcDir string - mode ImportMode - }{ - {"Import(full, 0)", "go/build/doesnotexist", "", 0}, - {"Import(local, 0)", "./doesnotexist", filepath.Join(ctxt.GOROOT, "src/go/build"), 0}, - {"Import(full, FindOnly)", "go/build/doesnotexist", "", FindOnly}, - {"Import(local, FindOnly)", "./doesnotexist", filepath.Join(ctxt.GOROOT, "src/go/build"), FindOnly}, - } - for _, test := range tests { - p, err := ctxt.Import(test.path, test.srcDir, test.mode) - if err == nil || !strings.HasPrefix(err.Error(), "cannot find package") { - t.Errorf(`%s got error: %q, want "cannot find package" error`, test.label, err) - } - // If an error occurs, build.Import is documented to return - // a non-nil *Package containing partial information. - if p == nil { - t.Fatalf(`%s got nil p, want non-nil *Package`, test.label) - } - // Verify partial information in p. - if p.ImportPath != "go/build/doesnotexist" { - t.Errorf(`%s got p.ImportPath: %q, want "go/build/doesnotexist"`, test.label, p.ImportPath) - } - } -} - -func TestImportVendor(t *testing.T) { - MustHaveGoBuild(t) // really must just have source - ctxt := Default - ctxt.GOPATH = "" - p, err := ctxt.Import("golang_org/x/net/http2/hpack", filepath.Join(ctxt.GOROOT, "src/net/http"), 0) - if err != nil { - t.Fatalf("cannot find vendored golang_org/x/net/http2/hpack from net/http directory: %v", err) - } - want := "vendor/golang_org/x/net/http2/hpack" - if p.ImportPath != want { - t.Fatalf("Import succeeded but found %q, want %q", p.ImportPath, want) - } -} - -func TestImportVendorFailure(t *testing.T) { - MustHaveGoBuild(t) // really must just have source - ctxt := Default - ctxt.GOPATH = "" - p, err := ctxt.Import("x.com/y/z", filepath.Join(ctxt.GOROOT, "src/net/http"), 0) - if err == nil { - t.Fatalf("found made-up package x.com/y/z in %s", p.Dir) - } - - e := err.Error() - if !strings.Contains(e, " (vendor tree)") { - t.Fatalf("error on failed import does not mention GOROOT/src/vendor directory:\n%s", e) - } -} - -func TestImportVendorParentFailure(t *testing.T) { - MustHaveGoBuild(t) // really must just have source - ctxt := Default - ctxt.GOPATH = "" - // This import should fail because the vendor/golang.org/x/net/http2 directory has no source code. - p, err := ctxt.Import("golang_org/x/net/http2", filepath.Join(ctxt.GOROOT, "src/net/http"), 0) - if err == nil { - t.Fatalf("found empty parent in %s", p.Dir) - } - if p != nil && p.Dir != "" { - t.Fatalf("decided to use %s", p.Dir) - } - e := err.Error() - if !strings.Contains(e, " (vendor tree)") { - t.Fatalf("error on failed import does not mention GOROOT/src/vendor directory:\n%s", e) - } -} - -// HasGoBuild reports whether the current system can build programs with ``go build'' -// and then run them with os.StartProcess or exec.Command. -func HasGoBuild() bool { - switch runtime.GOOS { - case "android", "nacl": - return false - case "darwin": - if strings.HasPrefix(runtime.GOARCH, "arm") { - return false - } - } - return true -} - -// MustHaveGoBuild checks that the current system can build programs with ``go build'' -// and then run them with os.StartProcess or exec.Command. -// If not, MustHaveGoBuild calls t.Skip with an explanation. -func MustHaveGoBuild(t *testing.T) { - if !HasGoBuild() { - t.Skipf("skipping test: 'go build' not available on %s/%s", runtime.GOOS, runtime.GOARCH) - } -} diff --git a/vendor/github.com/magefile/mage/build/deps_test.go b/vendor/github.com/magefile/mage/build/deps_test.go deleted file mode 100644 index 1e64d0c..0000000 --- a/vendor/github.com/magefile/mage/build/deps_test.go +++ /dev/null @@ -1,556 +0,0 @@ -// Copyright 2012 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. - -// This file exercises the import parser but also checks that -// some low-level packages do not have new dependencies added. - -package build - -import ( - "bytes" - "fmt" - "io/ioutil" - "os" - "path/filepath" - "sort" - "strconv" - "strings" -) - -// pkgDeps defines the expected dependencies between packages in -// the Go source tree. It is a statement of policy. -// Changes should not be made to this map without prior discussion. -// -// The map contains two kinds of entries: -// 1) Lower-case keys are standard import paths and list the -// allowed imports in that package. -// 2) Upper-case keys define aliases for package sets, which can then -// be used as dependencies by other rules. -// -// DO NOT CHANGE THIS DATA TO FIX BUILDS. -// -var pkgDeps = map[string][]string{ - // L0 is the lowest level, core, nearly unavoidable packages. - "errors": {}, - "io": {"errors", "sync"}, - "runtime": {"unsafe", "runtime/internal/atomic", "runtime/internal/sys"}, - "runtime/internal/sys": {}, - "runtime/internal/atomic": {"unsafe", "runtime/internal/sys"}, - "internal/race": {"runtime", "unsafe"}, - "sync": {"internal/race", "runtime", "sync/atomic", "unsafe"}, - "sync/atomic": {"unsafe"}, - "unsafe": {}, - "internal/cpu": {"runtime"}, - - "L0": { - "errors", - "io", - "runtime", - "runtime/internal/atomic", - "sync", - "sync/atomic", - "unsafe", - "internal/cpu", - }, - - // L1 adds simple functions and strings processing, - // but not Unicode tables. - "math": {"internal/cpu", "unsafe"}, - "math/bits": {}, - "math/cmplx": {"math"}, - "math/rand": {"L0", "math"}, - "strconv": {"L0", "unicode/utf8", "math"}, - "unicode/utf16": {}, - "unicode/utf8": {}, - - "L1": { - "L0", - "math", - "math/bits", - "math/cmplx", - "math/rand", - "sort", - "strconv", - "unicode/utf16", - "unicode/utf8", - }, - - // L2 adds Unicode and strings processing. - "bufio": {"L0", "unicode/utf8", "bytes"}, - "bytes": {"L0", "unicode", "unicode/utf8"}, - "path": {"L0", "unicode/utf8", "strings"}, - "strings": {"L0", "unicode", "unicode/utf8"}, - "unicode": {}, - - "L2": { - "L1", - "bufio", - "bytes", - "path", - "strings", - "unicode", - }, - - // L3 adds reflection and some basic utility packages - // and interface definitions, but nothing that makes - // system calls. - "crypto": {"L2", "hash"}, // interfaces - "crypto/cipher": {"L2", "crypto/subtle"}, - "crypto/subtle": {}, - "encoding/base32": {"L2"}, - "encoding/base64": {"L2"}, - "encoding/binary": {"L2", "reflect"}, - "hash": {"L2"}, // interfaces - "hash/adler32": {"L2", "hash"}, - "hash/crc32": {"L2", "hash"}, - "hash/crc64": {"L2", "hash"}, - "hash/fnv": {"L2", "hash"}, - "image": {"L2", "image/color"}, // interfaces - "image/color": {"L2"}, // interfaces - "image/color/palette": {"L2", "image/color"}, - "reflect": {"L2"}, - "sort": {"reflect"}, - - "L3": { - "L2", - "crypto", - "crypto/cipher", - "crypto/internal/cipherhw", - "crypto/subtle", - "encoding/base32", - "encoding/base64", - "encoding/binary", - "hash", - "hash/adler32", - "hash/crc32", - "hash/crc64", - "hash/fnv", - "image", - "image/color", - "image/color/palette", - "reflect", - }, - - // End of linear dependency definitions. - - // Operating system access. - "syscall": {"L0", "internal/race", "internal/syscall/windows/sysdll", "unicode/utf16"}, - "internal/syscall/unix": {"L0", "syscall"}, - "internal/syscall/windows": {"L0", "syscall", "internal/syscall/windows/sysdll"}, - "internal/syscall/windows/registry": {"L0", "syscall", "internal/syscall/windows/sysdll", "unicode/utf16"}, - "time": { - // "L0" without the "io" package: - "errors", - "runtime", - "runtime/internal/atomic", - "sync", - "sync/atomic", - "unsafe", - // Other time dependencies: - "internal/syscall/windows/registry", - "syscall", - }, - - "internal/poll": {"L0", "internal/race", "syscall", "time", "unicode/utf16", "unicode/utf8"}, - "os": {"L1", "os", "syscall", "time", "internal/poll", "internal/syscall/windows"}, - "path/filepath": {"L2", "os", "syscall"}, - "io/ioutil": {"L2", "os", "path/filepath", "time"}, - "os/exec": {"L2", "os", "context", "path/filepath", "syscall"}, - "os/signal": {"L2", "os", "syscall"}, - - // OS enables basic operating system functionality, - // but not direct use of package syscall, nor os/signal. - "OS": { - "io/ioutil", - "os", - "os/exec", - "path/filepath", - "time", - }, - - // Formatted I/O: few dependencies (L1) but we must add reflect. - "fmt": {"L1", "os", "reflect"}, - "log": {"L1", "os", "fmt", "time"}, - - // Packages used by testing must be low-level (L2+fmt). - "regexp": {"L2", "regexp/syntax"}, - "regexp/syntax": {"L2"}, - "runtime/debug": {"L2", "fmt", "io/ioutil", "os", "time"}, - "runtime/pprof": {"L2", "compress/gzip", "context", "encoding/binary", "fmt", "io/ioutil", "os", "text/tabwriter", "time"}, - "runtime/trace": {"L0"}, - "text/tabwriter": {"L2"}, - - "testing": {"L2", "flag", "fmt", "internal/race", "os", "runtime/debug", "runtime/pprof", "runtime/trace", "time"}, - "testing/iotest": {"L2", "log"}, - "testing/quick": {"L2", "flag", "fmt", "reflect", "time"}, - "internal/testenv": {"L2", "OS", "flag", "testing", "syscall"}, - - // L4 is defined as L3+fmt+log+time, because in general once - // you're using L3 packages, use of fmt, log, or time is not a big deal. - "L4": { - "L3", - "fmt", - "log", - "time", - }, - - // Go parser. - "go/ast": {"L4", "OS", "go/scanner", "go/token"}, - "go/doc": {"L4", "go/ast", "go/token", "regexp", "text/template"}, - "go/parser": {"L4", "OS", "go/ast", "go/scanner", "go/token"}, - "go/printer": {"L4", "OS", "go/ast", "go/scanner", "go/token", "text/tabwriter"}, - "go/scanner": {"L4", "OS", "go/token"}, - "go/token": {"L4"}, - - "GOPARSER": { - "go/ast", - "go/doc", - "go/parser", - "go/printer", - "go/scanner", - "go/token", - }, - - "go/format": {"L4", "GOPARSER", "internal/format"}, - "internal/format": {"L4", "GOPARSER"}, - - // Go type checking. - "go/constant": {"L4", "go/token", "math/big"}, - "go/importer": {"L4", "go/build", "go/internal/gccgoimporter", "go/internal/gcimporter", "go/internal/srcimporter", "go/token", "go/types"}, - "go/internal/gcimporter": {"L4", "OS", "go/build", "go/constant", "go/token", "go/types", "text/scanner"}, - "go/internal/gccgoimporter": {"L4", "OS", "debug/elf", "go/constant", "go/token", "go/types", "text/scanner"}, - "go/internal/srcimporter": {"L4", "fmt", "go/ast", "go/build", "go/parser", "go/token", "go/types", "path/filepath"}, - "go/types": {"L4", "GOPARSER", "container/heap", "go/constant"}, - - // One of a kind. - "archive/tar": {"L4", "OS", "syscall"}, - "archive/zip": {"L4", "OS", "compress/flate"}, - "container/heap": {"sort"}, - "compress/bzip2": {"L4"}, - "compress/flate": {"L4"}, - "compress/gzip": {"L4", "compress/flate"}, - "compress/lzw": {"L4"}, - "compress/zlib": {"L4", "compress/flate"}, - "context": {"errors", "fmt", "reflect", "sync", "time"}, - "database/sql": {"L4", "container/list", "context", "database/sql/driver", "database/sql/internal"}, - "database/sql/driver": {"L4", "context", "time", "database/sql/internal"}, - "debug/dwarf": {"L4"}, - "debug/elf": {"L4", "OS", "debug/dwarf", "compress/zlib"}, - "debug/gosym": {"L4"}, - "debug/macho": {"L4", "OS", "debug/dwarf"}, - "debug/pe": {"L4", "OS", "debug/dwarf"}, - "debug/plan9obj": {"L4", "OS"}, - "encoding": {"L4"}, - "encoding/ascii85": {"L4"}, - "encoding/asn1": {"L4", "math/big"}, - "encoding/csv": {"L4"}, - "encoding/gob": {"L4", "OS", "encoding"}, - "encoding/hex": {"L4"}, - "encoding/json": {"L4", "encoding"}, - "encoding/pem": {"L4"}, - "encoding/xml": {"L4", "encoding"}, - "flag": {"L4", "OS"}, - "go/build": {"L4", "OS", "GOPARSER"}, - "html": {"L4"}, - "image/draw": {"L4", "image/internal/imageutil"}, - "image/gif": {"L4", "compress/lzw", "image/color/palette", "image/draw"}, - "image/internal/imageutil": {"L4"}, - "image/jpeg": {"L4", "image/internal/imageutil"}, - "image/png": {"L4", "compress/zlib"}, - "index/suffixarray": {"L4", "regexp"}, - "internal/singleflight": {"sync"}, - "internal/trace": {"L4", "OS"}, - "math/big": {"L4"}, - "mime": {"L4", "OS", "syscall", "internal/syscall/windows/registry"}, - "mime/quotedprintable": {"L4"}, - "net/internal/socktest": {"L4", "OS", "syscall"}, - "net/url": {"L4"}, - "plugin": {"L0", "OS", "CGO"}, - "runtime/pprof/internal/profile": {"L4", "OS", "compress/gzip", "regexp"}, - "testing/internal/testdeps": {"L4", "runtime/pprof", "regexp"}, - "text/scanner": {"L4", "OS"}, - "text/template/parse": {"L4"}, - - "html/template": { - "L4", "OS", "encoding/json", "html", "text/template", - "text/template/parse", - }, - "text/template": { - "L4", "OS", "net/url", "text/template/parse", - }, - - // Cgo. - // If you add a dependency on CGO, you must add the package to - // cgoPackages in cmd/dist/test.go. - "runtime/cgo": {"L0", "C"}, - "CGO": {"C", "runtime/cgo"}, - - // Fake entry to satisfy the pseudo-import "C" - // that shows up in programs that use cgo. - "C": {}, - - // Race detector/MSan uses cgo. - "runtime/race": {"C"}, - "runtime/msan": {"C"}, - - // Plan 9 alone needs io/ioutil and os. - "os/user": {"L4", "CGO", "io/ioutil", "os", "syscall"}, - - // Basic networking. - // Because net must be used by any package that wants to - // do networking portably, it must have a small dependency set: just L0+basic os. - "net": { - "L0", "CGO", - "context", "math/rand", "os", "reflect", "sort", "syscall", "time", - "internal/nettrace", "internal/poll", - "internal/syscall/windows", "internal/singleflight", "internal/race", - "golang_org/x/net/lif", "golang_org/x/net/route", - }, - - // NET enables use of basic network-related packages. - "NET": { - "net", - "mime", - "net/textproto", - "net/url", - }, - - // Uses of networking. - "log/syslog": {"L4", "OS", "net"}, - "net/mail": {"L4", "NET", "OS", "mime"}, - "net/textproto": {"L4", "OS", "net"}, - - // Core crypto. - "crypto/aes": {"L3"}, - "crypto/des": {"L3"}, - "crypto/hmac": {"L3"}, - "crypto/md5": {"L3"}, - "crypto/rc4": {"L3"}, - "crypto/sha1": {"L3"}, - "crypto/sha256": {"L3"}, - "crypto/sha512": {"L3"}, - - "CRYPTO": { - "crypto/aes", - "crypto/des", - "crypto/hmac", - "crypto/md5", - "crypto/rc4", - "crypto/sha1", - "crypto/sha256", - "crypto/sha512", - "golang_org/x/crypto/chacha20poly1305", - "golang_org/x/crypto/curve25519", - "golang_org/x/crypto/poly1305", - }, - - // Random byte, number generation. - // This would be part of core crypto except that it imports - // math/big, which imports fmt. - "crypto/rand": {"L4", "CRYPTO", "OS", "math/big", "syscall", "internal/syscall/unix"}, - - // Mathematical crypto: dependencies on fmt (L4) and math/big. - // We could avoid some of the fmt, but math/big imports fmt anyway. - "crypto/dsa": {"L4", "CRYPTO", "math/big"}, - "crypto/ecdsa": {"L4", "CRYPTO", "crypto/elliptic", "math/big", "encoding/asn1"}, - "crypto/elliptic": {"L4", "CRYPTO", "math/big"}, - "crypto/rsa": {"L4", "CRYPTO", "crypto/rand", "math/big"}, - - "CRYPTO-MATH": { - "CRYPTO", - "crypto/dsa", - "crypto/ecdsa", - "crypto/elliptic", - "crypto/rand", - "crypto/rsa", - "encoding/asn1", - "math/big", - }, - - // SSL/TLS. - "crypto/tls": { - "L4", "CRYPTO-MATH", "OS", - "container/list", "crypto/x509", "encoding/pem", "net", "syscall", - }, - "crypto/x509": { - "L4", "CRYPTO-MATH", "OS", "CGO", - "crypto/x509/pkix", "encoding/pem", "encoding/hex", "net", "os/user", "syscall", - }, - "crypto/x509/pkix": {"L4", "CRYPTO-MATH"}, - - // Simple net+crypto-aware packages. - "mime/multipart": {"L4", "OS", "mime", "crypto/rand", "net/textproto", "mime/quotedprintable"}, - "net/smtp": {"L4", "CRYPTO", "NET", "crypto/tls"}, - - // HTTP, kingpin of dependencies. - "net/http": { - "L4", "NET", "OS", - "compress/gzip", - "container/list", - "context", - "crypto/rand", - "crypto/tls", - "golang_org/x/net/http2/hpack", - "golang_org/x/net/idna", - "golang_org/x/net/lex/httplex", - "golang_org/x/net/proxy", - "golang_org/x/text/unicode/norm", - "golang_org/x/text/width", - "internal/nettrace", - "mime/multipart", - "net/http/httptrace", - "net/http/internal", - "runtime/debug", - }, - "net/http/internal": {"L4"}, - "net/http/httptrace": {"context", "crypto/tls", "internal/nettrace", "net", "reflect", "time"}, - - // HTTP-using packages. - "expvar": {"L4", "OS", "encoding/json", "net/http"}, - "net/http/cgi": {"L4", "NET", "OS", "crypto/tls", "net/http", "regexp"}, - "net/http/cookiejar": {"L4", "NET", "net/http"}, - "net/http/fcgi": {"L4", "NET", "OS", "context", "net/http", "net/http/cgi"}, - "net/http/httptest": {"L4", "NET", "OS", "crypto/tls", "flag", "net/http", "net/http/internal", "crypto/x509"}, - "net/http/httputil": {"L4", "NET", "OS", "context", "net/http", "net/http/internal"}, - "net/http/pprof": {"L4", "OS", "html/template", "net/http", "runtime/pprof", "runtime/trace"}, - "net/rpc": {"L4", "NET", "encoding/gob", "html/template", "net/http"}, - "net/rpc/jsonrpc": {"L4", "NET", "encoding/json", "net/rpc"}, -} - -// isMacro reports whether p is a package dependency macro -// (uppercase name). -func isMacro(p string) bool { - return 'A' <= p[0] && p[0] <= 'Z' -} - -func allowed(pkg string) map[string]bool { - m := map[string]bool{} - var allow func(string) - allow = func(p string) { - if m[p] { - return - } - m[p] = true // set even for macros, to avoid loop on cycle - - // Upper-case names are macro-expanded. - if isMacro(p) { - for _, pp := range pkgDeps[p] { - allow(pp) - } - } - } - for _, pp := range pkgDeps[pkg] { - allow(pp) - } - return m -} - -// listStdPkgs returns the same list of packages as "go list std". -func listStdPkgs(goroot string) ([]string, error) { - // Based on cmd/go's matchPackages function. - var pkgs []string - - src := filepath.Join(goroot, "src") + string(filepath.Separator) - walkFn := func(path string, fi os.FileInfo, err error) error { - if err != nil || !fi.IsDir() || path == src { - return nil - } - - base := filepath.Base(path) - if strings.HasPrefix(base, ".") || strings.HasPrefix(base, "_") || base == "testdata" { - return filepath.SkipDir - } - - name := filepath.ToSlash(path[len(src):]) - if name == "builtin" || name == "cmd" || strings.Contains(name, "golang_org") { - return filepath.SkipDir - } - - pkgs = append(pkgs, name) - return nil - } - if err := filepath.Walk(src, walkFn); err != nil { - return nil, err - } - return pkgs, nil -} - -// This test does not function well in travis under different go versions for some reason. -// -// func TestDependencies(t *testing.T) { -// iOS := runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") -// if runtime.GOOS == "nacl" || iOS { -// // Tests run in a limited file system and we do not -// // provide access to every source file. -// t.Skipf("skipping on %s/%s, missing full GOROOT", runtime.GOOS, runtime.GOARCH) -// } - -// ctxt := Default -// all, err := listStdPkgs(ctxt.GOROOT) -// if err != nil { -// t.Fatal(err) -// } -// sort.Strings(all) - -// for _, pkg := range all { -// imports, err := findImports(pkg) -// if err != nil { -// t.Error(err) -// continue -// } -// ok := allowed(pkg) -// var bad []string -// for _, imp := range imports { -// if !ok[imp] { -// bad = append(bad, imp) -// } -// } -// if bad != nil { -// t.Errorf("unexpected dependency: %s imports %v", pkg, bad) -// } -// } -// } - -var buildIgnore = []byte("\n// +build ignore") - -func findImports(pkg string) ([]string, error) { - dir := filepath.Join(Default.GOROOT, "src", pkg) - files, err := ioutil.ReadDir(dir) - if err != nil { - return nil, err - } - var imports []string - var haveImport = map[string]bool{} - for _, file := range files { - name := file.Name() - if !strings.HasSuffix(name, ".go") || strings.HasSuffix(name, "_test.go") { - continue - } - f, err := os.Open(filepath.Join(dir, name)) - if err != nil { - return nil, err - } - var imp []string - data, err := readImports(f, false, &imp) - f.Close() - if err != nil { - return nil, fmt.Errorf("reading %v: %v", name, err) - } - if bytes.Contains(data, buildIgnore) { - continue - } - for _, quoted := range imp { - path, err := strconv.Unquote(quoted) - if err != nil { - continue - } - if !haveImport[path] { - haveImport[path] = true - imports = append(imports, path) - } - } - } - sort.Strings(imports) - return imports, nil -} diff --git a/vendor/github.com/magefile/mage/build/doc.go b/vendor/github.com/magefile/mage/build/doc.go deleted file mode 100644 index 422e1a5..0000000 --- a/vendor/github.com/magefile/mage/build/doc.go +++ /dev/null @@ -1,166 +0,0 @@ -// 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 build gathers information about Go packages. -// -// Go Path -// -// The Go path is a list of directory trees containing Go source code. -// It is consulted to resolve imports that cannot be found in the standard -// Go tree. The default path is the value of the GOPATH environment -// variable, interpreted as a path list appropriate to the operating system -// (on Unix, the variable is a colon-separated string; -// on Windows, a semicolon-separated string; -// on Plan 9, a list). -// -// Each directory listed in the Go path must have a prescribed structure: -// -// The src/ directory holds source code. The path below 'src' determines -// the import path or executable name. -// -// The pkg/ directory holds installed package objects. -// As in the Go tree, each target operating system and -// architecture pair has its own subdirectory of pkg -// (pkg/GOOS_GOARCH). -// -// If DIR is a directory listed in the Go path, a package with -// source in DIR/src/foo/bar can be imported as "foo/bar" and -// has its compiled form installed to "DIR/pkg/GOOS_GOARCH/foo/bar.a" -// (or, for gccgo, "DIR/pkg/gccgo/foo/libbar.a"). -// -// The bin/ directory holds compiled commands. -// Each command is named for its source directory, but only -// using the final element, not the entire path. That is, the -// command with source in DIR/src/foo/quux is installed into -// DIR/bin/quux, not DIR/bin/foo/quux. The foo/ is stripped -// so that you can add DIR/bin to your PATH to get at the -// installed commands. -// -// Here's an example directory layout: -// -// GOPATH=/home/user/gocode -// -// /home/user/gocode/ -// src/ -// foo/ -// bar/ (go code in package bar) -// x.go -// quux/ (go code in package main) -// y.go -// bin/ -// quux (installed command) -// pkg/ -// linux_amd64/ -// foo/ -// bar.a (installed package object) -// -// Build Constraints -// -// A build constraint, also known as a build tag, is a line comment that begins -// -// // +build -// -// that lists the conditions under which a file should be included in the package. -// Constraints may appear in any kind of source file (not just Go), but -// they must appear near the top of the file, preceded -// only by blank lines and other line comments. These rules mean that in Go -// files a build constraint must appear before the package clause. -// -// To distinguish build constraints from package documentation, a series of -// build constraints must be followed by a blank line. -// -// A build constraint is evaluated as the OR of space-separated options; -// each option evaluates as the AND of its comma-separated terms; -// and each term is an alphanumeric word or, preceded by !, its negation. -// That is, the build constraint: -// -// // +build linux,386 darwin,!cgo -// -// corresponds to the boolean formula: -// -// (linux AND 386) OR (darwin AND (NOT cgo)) -// -// A file may have multiple build constraints. The overall constraint is the AND -// of the individual constraints. That is, the build constraints: -// -// // +build linux darwin -// // +build 386 -// -// corresponds to the boolean formula: -// -// (linux OR darwin) AND 386 -// -// During a particular build, the following words are satisfied: -// -// - the target operating system, as spelled by runtime.GOOS -// - the target architecture, as spelled by runtime.GOARCH -// - the compiler being used, either "gc" or "gccgo" -// - "cgo", if ctxt.CgoEnabled is true -// - "go1.1", from Go version 1.1 onward -// - "go1.2", from Go version 1.2 onward -// - "go1.3", from Go version 1.3 onward -// - "go1.4", from Go version 1.4 onward -// - "go1.5", from Go version 1.5 onward -// - "go1.6", from Go version 1.6 onward -// - "go1.7", from Go version 1.7 onward -// - "go1.8", from Go version 1.8 onward -// - "go1.9", from Go version 1.9 onward -// - any additional words listed in ctxt.BuildTags -// -// If a file's name, after stripping the extension and a possible _test suffix, -// matches any of the following patterns: -// *_GOOS -// *_GOARCH -// *_GOOS_GOARCH -// (example: source_windows_amd64.go) where GOOS and GOARCH represent -// any known operating system and architecture values respectively, then -// the file is considered to have an implicit build constraint requiring -// those terms (in addition to any explicit constraints in the file). -// -// To keep a file from being considered for the build: -// -// // +build ignore -// -// (any other unsatisfied word will work as well, but ``ignore'' is conventional.) -// -// To build a file only when using cgo, and only on Linux and OS X: -// -// // +build linux,cgo darwin,cgo -// -// Such a file is usually paired with another file implementing the -// default functionality for other systems, which in this case would -// carry the constraint: -// -// // +build !linux,!darwin !cgo -// -// Naming a file dns_windows.go will cause it to be included only when -// building the package for Windows; similarly, math_386.s will be included -// only when building the package for 32-bit x86. -// -// Using GOOS=android matches build tags and files as for GOOS=linux -// in addition to android tags and files. -// -// Binary-Only Packages -// -// It is possible to distribute packages in binary form without including the -// source code used for compiling the package. To do this, the package must -// be distributed with a source file not excluded by build constraints and -// containing a "//go:binary-only-package" comment. -// Like a build constraint, this comment must appear near the top of the file, -// preceded only by blank lines and other line comments and with a blank line -// following the comment, to separate it from the package documentation. -// Unlike build constraints, this comment is only recognized in non-test -// Go source files. -// -// The minimal source code for a binary-only package is therefore: -// -// //go:binary-only-package -// -// package mypkg -// -// The source code may include additional Go code. That code is never compiled -// but will be processed by tools like godoc and might be useful as end-user -// documentation. -// -package build diff --git a/vendor/github.com/magefile/mage/build/read.go b/vendor/github.com/magefile/mage/build/read.go deleted file mode 100644 index 29b8cdc..0000000 --- a/vendor/github.com/magefile/mage/build/read.go +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright 2012 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 build - -import ( - "bufio" - "errors" - "io" - "unicode/utf8" -) - -type importReader struct { - b *bufio.Reader - buf []byte - peek byte - err error - eof bool - nerr int -} - -func isIdent(c byte) bool { - return 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z' || '0' <= c && c <= '9' || c == '_' || c >= utf8.RuneSelf -} - -var ( - errSyntax = errors.New("syntax error") - errNUL = errors.New("unexpected NUL in input") -) - -// syntaxError records a syntax error, but only if an I/O error has not already been recorded. -func (r *importReader) syntaxError() { - if r.err == nil { - r.err = errSyntax - } -} - -// readByte reads the next byte from the input, saves it in buf, and returns it. -// If an error occurs, readByte records the error in r.err and returns 0. -func (r *importReader) readByte() byte { - c, err := r.b.ReadByte() - if err == nil { - r.buf = append(r.buf, c) - if c == 0 { - err = errNUL - } - } - if err != nil { - if err == io.EOF { - r.eof = true - } else if r.err == nil { - r.err = err - } - c = 0 - } - return c -} - -// peekByte returns the next byte from the input reader but does not advance beyond it. -// If skipSpace is set, peekByte skips leading spaces and comments. -func (r *importReader) peekByte(skipSpace bool) byte { - if r.err != nil { - if r.nerr++; r.nerr > 10000 { - panic("go/build: import reader looping") - } - return 0 - } - - // Use r.peek as first input byte. - // Don't just return r.peek here: it might have been left by peekByte(false) - // and this might be peekByte(true). - c := r.peek - if c == 0 { - c = r.readByte() - } - for r.err == nil && !r.eof { - if skipSpace { - // For the purposes of this reader, semicolons are never necessary to - // understand the input and are treated as spaces. - switch c { - case ' ', '\f', '\t', '\r', '\n', ';': - c = r.readByte() - continue - - case '/': - c = r.readByte() - if c == '/' { - for c != '\n' && r.err == nil && !r.eof { - c = r.readByte() - } - } else if c == '*' { - var c1 byte - for (c != '*' || c1 != '/') && r.err == nil { - if r.eof { - r.syntaxError() - } - c, c1 = c1, r.readByte() - } - } else { - r.syntaxError() - } - c = r.readByte() - continue - } - } - break - } - r.peek = c - return r.peek -} - -// nextByte is like peekByte but advances beyond the returned byte. -func (r *importReader) nextByte(skipSpace bool) byte { - c := r.peekByte(skipSpace) - r.peek = 0 - return c -} - -// readKeyword reads the given keyword from the input. -// If the keyword is not present, readKeyword records a syntax error. -func (r *importReader) readKeyword(kw string) { - r.peekByte(true) - for i := 0; i < len(kw); i++ { - if r.nextByte(false) != kw[i] { - r.syntaxError() - return - } - } - if isIdent(r.peekByte(false)) { - r.syntaxError() - } -} - -// readIdent reads an identifier from the input. -// If an identifier is not present, readIdent records a syntax error. -func (r *importReader) readIdent() { - c := r.peekByte(true) - if !isIdent(c) { - r.syntaxError() - return - } - for isIdent(r.peekByte(false)) { - r.peek = 0 - } -} - -// readString reads a quoted string literal from the input. -// If an identifier is not present, readString records a syntax error. -func (r *importReader) readString(save *[]string) { - switch r.nextByte(true) { - case '`': - start := len(r.buf) - 1 - for r.err == nil { - if r.nextByte(false) == '`' { - if save != nil { - *save = append(*save, string(r.buf[start:])) - } - break - } - if r.eof { - r.syntaxError() - } - } - case '"': - start := len(r.buf) - 1 - for r.err == nil { - c := r.nextByte(false) - if c == '"' { - if save != nil { - *save = append(*save, string(r.buf[start:])) - } - break - } - if r.eof || c == '\n' { - r.syntaxError() - } - if c == '\\' { - r.nextByte(false) - } - } - default: - r.syntaxError() - } -} - -// readImport reads an import clause - optional identifier followed by quoted string - -// from the input. -func (r *importReader) readImport(imports *[]string) { - c := r.peekByte(true) - if c == '.' { - r.peek = 0 - } else if isIdent(c) { - r.readIdent() - } - r.readString(imports) -} - -// readComments is like ioutil.ReadAll, except that it only reads the leading -// block of comments in the file. -func readComments(f io.Reader) ([]byte, error) { - r := &importReader{b: bufio.NewReader(f)} - r.peekByte(true) - if r.err == nil && !r.eof { - // Didn't reach EOF, so must have found a non-space byte. Remove it. - r.buf = r.buf[:len(r.buf)-1] - } - return r.buf, r.err -} - -// readImports is like ioutil.ReadAll, except that it expects a Go file as input -// and stops reading the input once the imports have completed. -func readImports(f io.Reader, reportSyntaxError bool, imports *[]string) ([]byte, error) { - r := &importReader{b: bufio.NewReader(f)} - - r.readKeyword("package") - r.readIdent() - for r.peekByte(true) == 'i' { - r.readKeyword("import") - if r.peekByte(true) == '(' { - r.nextByte(false) - for r.peekByte(true) != ')' && r.err == nil { - r.readImport(imports) - } - r.nextByte(false) - } else { - r.readImport(imports) - } - } - - // If we stopped successfully before EOF, we read a byte that told us we were done. - // Return all but that last byte, which would cause a syntax error if we let it through. - if r.err == nil && !r.eof { - return r.buf[:len(r.buf)-1], nil - } - - // If we stopped for a syntax error, consume the whole file so that - // we are sure we don't change the errors that go/parser returns. - if r.err == errSyntax && !reportSyntaxError { - r.err = nil - for r.err == nil && !r.eof { - r.readByte() - } - } - - return r.buf, r.err -} diff --git a/vendor/github.com/magefile/mage/build/read_test.go b/vendor/github.com/magefile/mage/build/read_test.go deleted file mode 100644 index 9cef657..0000000 --- a/vendor/github.com/magefile/mage/build/read_test.go +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright 2012 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 build - -import ( - "io" - "strings" - "testing" -) - -const quote = "`" - -type readTest struct { - // Test input contains ℙ where readImports should stop. - in string - err string -} - -var readImportsTests = []readTest{ - { - `package p`, - "", - }, - { - `package p; import "x"`, - "", - }, - { - `package p; import . "x"`, - "", - }, - { - `package p; import "x";ℙvar x = 1`, - "", - }, - { - `package p - - // comment - - import "x" - import _ "x" - import a "x" - - /* comment */ - - import ( - "x" /* comment */ - _ "x" - a "x" // comment - ` + quote + `x` + quote + ` - _ /*comment*/ ` + quote + `x` + quote + ` - a ` + quote + `x` + quote + ` - ) - import ( - ) - import () - import()import()import() - import();import();import() - - ℙvar x = 1 - `, - "", - }, -} - -var readCommentsTests = []readTest{ - { - `ℙpackage p`, - "", - }, - { - `ℙpackage p; import "x"`, - "", - }, - { - `ℙpackage p; import . "x"`, - "", - }, - { - `// foo - - /* bar */ - - /* quux */ // baz - - /*/ zot */ - - // asdf - ℙHello, world`, - "", - }, -} - -func testRead(t *testing.T, tests []readTest, read func(io.Reader) ([]byte, error)) { - for i, tt := range tests { - var in, testOut string - j := strings.Index(tt.in, "ℙ") - if j < 0 { - in = tt.in - testOut = tt.in - } else { - in = tt.in[:j] + tt.in[j+len("ℙ"):] - testOut = tt.in[:j] - } - r := strings.NewReader(in) - buf, err := read(r) - if err != nil { - if tt.err == "" { - t.Errorf("#%d: err=%q, expected success (%q)", i, err, string(buf)) - continue - } - if !strings.Contains(err.Error(), tt.err) { - t.Errorf("#%d: err=%q, expected %q", i, err, tt.err) - continue - } - continue - } - if err == nil && tt.err != "" { - t.Errorf("#%d: success, expected %q", i, tt.err) - continue - } - - out := string(buf) - if out != testOut { - t.Errorf("#%d: wrong output:\nhave %q\nwant %q\n", i, out, testOut) - } - } -} - -func TestReadImports(t *testing.T) { - testRead(t, readImportsTests, func(r io.Reader) ([]byte, error) { return readImports(r, true, nil) }) -} - -func TestReadComments(t *testing.T) { - testRead(t, readCommentsTests, readComments) -} - -var readFailuresTests = []readTest{ - { - `package`, - "syntax error", - }, - { - "package p\n\x00\nimport `math`\n", - "unexpected NUL in input", - }, - { - `package p; import`, - "syntax error", - }, - { - `package p; import "`, - "syntax error", - }, - { - "package p; import ` \n\n", - "syntax error", - }, - { - `package p; import "x`, - "syntax error", - }, - { - `package p; import _`, - "syntax error", - }, - { - `package p; import _ "`, - "syntax error", - }, - { - `package p; import _ "x`, - "syntax error", - }, - { - `package p; import .`, - "syntax error", - }, - { - `package p; import . "`, - "syntax error", - }, - { - `package p; import . "x`, - "syntax error", - }, - { - `package p; import (`, - "syntax error", - }, - { - `package p; import ("`, - "syntax error", - }, - { - `package p; import ("x`, - "syntax error", - }, - { - `package p; import ("x"`, - "syntax error", - }, -} - -func TestReadFailures(t *testing.T) { - // Errors should be reported (true arg to readImports). - testRead(t, readFailuresTests, func(r io.Reader) ([]byte, error) { return readImports(r, true, nil) }) -} - -func TestReadFailuresIgnored(t *testing.T) { - // Syntax errors should not be reported (false arg to readImports). - // Instead, entire file should be the output and no error. - // Convert tests not to return syntax errors. - tests := make([]readTest, len(readFailuresTests)) - copy(tests, readFailuresTests) - for i := range tests { - tt := &tests[i] - if !strings.Contains(tt.err, "NUL") { - tt.err = "" - } - } - testRead(t, tests, func(r io.Reader) ([]byte, error) { return readImports(r, false, nil) }) -} diff --git a/vendor/github.com/magefile/mage/build/syslist.go b/vendor/github.com/magefile/mage/build/syslist.go deleted file mode 100644 index 73fdbe6..0000000 --- a/vendor/github.com/magefile/mage/build/syslist.go +++ /dev/null @@ -1,8 +0,0 @@ -// 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 build - -const goosList = "android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows zos " -const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc s390 s390x sparc sparc64 " diff --git a/vendor/github.com/magefile/mage/build/syslist_test.go b/vendor/github.com/magefile/mage/build/syslist_test.go deleted file mode 100644 index 7973ff4..0000000 --- a/vendor/github.com/magefile/mage/build/syslist_test.go +++ /dev/null @@ -1,62 +0,0 @@ -// 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 build - -import ( - "runtime" - "testing" -) - -var ( - thisOS = runtime.GOOS - thisArch = runtime.GOARCH - otherOS = anotherOS() - otherArch = anotherArch() -) - -func anotherOS() string { - if thisOS != "darwin" { - return "darwin" - } - return "linux" -} - -func anotherArch() string { - if thisArch != "amd64" { - return "amd64" - } - return "386" -} - -type GoodFileTest struct { - name string - result bool -} - -var tests = []GoodFileTest{ - {"file.go", true}, - {"file.c", true}, - {"file_foo.go", true}, - {"file_" + thisArch + ".go", true}, - {"file_" + otherArch + ".go", false}, - {"file_" + thisOS + ".go", true}, - {"file_" + otherOS + ".go", false}, - {"file_" + thisOS + "_" + thisArch + ".go", true}, - {"file_" + otherOS + "_" + thisArch + ".go", false}, - {"file_" + thisOS + "_" + otherArch + ".go", false}, - {"file_" + otherOS + "_" + otherArch + ".go", false}, - {"file_foo_" + thisArch + ".go", true}, - {"file_foo_" + otherArch + ".go", false}, - {"file_" + thisOS + ".c", true}, - {"file_" + otherOS + ".c", false}, -} - -func TestGoodOSArch(t *testing.T) { - for _, test := range tests { - if Default.goodOSArchFile(test.name, make(map[string]bool)) != test.result { - t.Fatalf("goodOSArchFile(%q) != %v", test.name, test.result) - } - } -} diff --git a/vendor/github.com/magefile/mage/build/testdata/empty/dummy b/vendor/github.com/magefile/mage/build/testdata/empty/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/vendor/github.com/magefile/mage/build/testdata/multi/file.go b/vendor/github.com/magefile/mage/build/testdata/multi/file.go deleted file mode 100644 index ee946eb..0000000 --- a/vendor/github.com/magefile/mage/build/testdata/multi/file.go +++ /dev/null @@ -1,5 +0,0 @@ -// Test data - not compiled. - -package main - -func main() {} diff --git a/vendor/github.com/magefile/mage/build/testdata/multi/file_appengine.go b/vendor/github.com/magefile/mage/build/testdata/multi/file_appengine.go deleted file mode 100644 index 4ea31e7..0000000 --- a/vendor/github.com/magefile/mage/build/testdata/multi/file_appengine.go +++ /dev/null @@ -1,5 +0,0 @@ -// Test data - not compiled. - -package test_package - -func init() {} diff --git a/vendor/github.com/magefile/mage/build/testdata/other/file/file.go b/vendor/github.com/magefile/mage/build/testdata/other/file/file.go deleted file mode 100644 index bbfd3e9..0000000 --- a/vendor/github.com/magefile/mage/build/testdata/other/file/file.go +++ /dev/null @@ -1,5 +0,0 @@ -// Test data - not compiled. - -package file - -func F() {} diff --git a/vendor/github.com/magefile/mage/build/testdata/other/main.go b/vendor/github.com/magefile/mage/build/testdata/other/main.go deleted file mode 100644 index e090435..0000000 --- a/vendor/github.com/magefile/mage/build/testdata/other/main.go +++ /dev/null @@ -1,11 +0,0 @@ -// Test data - not compiled. - -package main - -import ( - "./file" -) - -func main() { - file.F() -} diff --git a/vendor/github.com/magefile/mage/build/zcgo.go b/vendor/github.com/magefile/mage/build/zcgo.go deleted file mode 100644 index 86e2a2d..0000000 --- a/vendor/github.com/magefile/mage/build/zcgo.go +++ /dev/null @@ -1,37 +0,0 @@ -// auto generated by go tool dist - -package build - -const defaultCGO_ENABLED = "" - -var cgoEnabled = map[string]bool{ - "android/386": true, - "android/amd64": true, - "android/arm": true, - "android/arm64": true, - "darwin/386": true, - "darwin/amd64": true, - "darwin/arm": true, - "darwin/arm64": true, - "dragonfly/amd64": true, - "freebsd/386": true, - "freebsd/amd64": true, - "linux/386": true, - "linux/amd64": true, - "linux/arm": true, - "linux/arm64": true, - "linux/mips": true, - "linux/mips64": true, - "linux/mips64le": true, - "linux/mipsle": true, - "linux/ppc64le": true, - "linux/s390x": true, - "netbsd/386": true, - "netbsd/amd64": true, - "netbsd/arm": true, - "openbsd/386": true, - "openbsd/amd64": true, - "solaris/amd64": true, - "windows/386": true, - "windows/amd64": true, -} diff --git a/vendor/github.com/magefile/mage/mage/magefile_tmpl.go b/vendor/github.com/magefile/mage/mage/magefile_tmpl.go deleted file mode 100644 index 01b8786..0000000 --- a/vendor/github.com/magefile/mage/mage/magefile_tmpl.go +++ /dev/null @@ -1,46 +0,0 @@ -package mage - -var mageTpl = `// +build mage - -package main - -import ( - "fmt" - "os" - "os/exec" - - "github.com/magefile/mage/mg" // mg contains helpful utility functions, like Deps -) - -// Default target to run when none is specified -// If not set, running mage will list available targets -// var Default = Build - -// A build step that requires additional params, or platform specific steps for example -func Build() error { - mg.Deps(InstallDeps) - fmt.Println("Building...") - cmd := exec.Command("go", "build", "-o", "MyApp", ".") - return cmd.Run() -} - -// A custom install step if you need your bin someplace other than go/bin -func Install() error { - mg.Deps(Build) - fmt.Println("Installing...") - return os.Rename("./MyApp", "/usr/bin/MyApp") -} - -// Manage your deps, or running package managers. -func InstallDeps() error { - fmt.Println("Installing Deps...") - cmd := exec.Command("go", "get", "github.com/stretchr/piglatin") - return cmd.Run() -} - -// Clean up after yourself -func Clean() { - fmt.Println("Cleaning...") - os.RemoveAll("MyApp") -} -` diff --git a/vendor/github.com/magefile/mage/mage/main.go b/vendor/github.com/magefile/mage/mage/main.go deleted file mode 100644 index 9525b4b..0000000 --- a/vendor/github.com/magefile/mage/mage/main.go +++ /dev/null @@ -1,396 +0,0 @@ -package mage - -import ( - "crypto/sha1" - "errors" - "flag" - "fmt" - "io" - "log" - "os" - "os/exec" - "path/filepath" - "runtime" - "sort" - "strconv" - "strings" - "text/template" - "time" - "unicode" - - "github.com/magefile/mage/build" - "github.com/magefile/mage/mg" - "github.com/magefile/mage/parse" - "github.com/magefile/mage/sh" -) - -// mageVer is used when hashing the output binary to ensure that we get a new -// binary if we use a differernt version of mage. -const mageVer = "v0.3" - -var output = template.Must(template.New("").Funcs(map[string]interface{}{ - "lower": strings.ToLower, - "lowerfirst": func(s string) string { - r := []rune(s) - return string(unicode.ToLower(r[0])) + string(r[1:]) - }, -}).Parse(tpl)) -var initOutput = template.Must(template.New("").Parse(mageTpl)) - -const mainfile = "mage_output_file.go" -const initFile = "magefile.go" - -var ( - timestamp, commitHash, gitTag string // set by ldflags when you "mage build" -) - -// Main is the entrypoint for running mage. It exists external to mage's main -// function to allow it to be used from other programs, specifically so you can -// go run a simple file that run's mage's Main. -func Main() int { - return ParseAndRun(".", os.Stdout, os.Stderr, os.Stdin, os.Args[1:]) -} - -// Invocation contains the args for invoking a run of Mage. -type Invocation struct { - Dir string // directory to read magefiles from - Force bool // forces recreation of the compiled binary - Verbose bool // tells the magefile to print out log statements - List bool // tells the magefile to print out a list of targets - Help bool // tells the magefile to print out help for a specific target - Keep bool // tells mage to keep the generated main file after compiling - Timeout time.Duration // tells mage to set a timeout to running the targets - Stdout io.Writer // writer to write stdout messages to - Stderr io.Writer // writer to write stderr messages to - Stdin io.Reader // reader to read stdin from - Args []string // args to pass to the compiled binary -} - -// ParseAndRun parses the command line, and then compiles and runs the mage -// files in the given directory with the given args (do not include the command -// name in the args). -func ParseAndRun(dir string, stdout, stderr io.Writer, stdin io.Reader, args []string) int { - log := log.New(stderr, "", 0) - inv, mageInit, showVersion, err := Parse(stdout, args) - inv.Dir = dir - inv.Stderr = stderr - inv.Stdin = stdin - if err == flag.ErrHelp { - return 0 - } - if err != nil { - log.Println("Error:", err) - return 2 - } - - if showVersion { - if timestamp == "" { - timestamp = "" - } - if commitHash == "" { - commitHash = "" - } - log.Println("Mage Build Tool", gitTag) - log.Println("Build Date:", timestamp) - log.Println("Commit:", commitHash) - return 0 - } - if mageInit { - if err := generateInit(dir); err != nil { - log.Println("Error:", err) - return 1 - } - log.Println(initFile, "created") - return 0 - } - - return Invoke(inv) -} - -// Parse parses the given args and returns structured data. If parse returns -// flag.ErrHelp, the calling process should exit with code 0. -func Parse(stdout io.Writer, args []string) (inv Invocation, mageInit, showVersion bool, err error) { - inv.Stdout = stdout - fs := flag.FlagSet{} - fs.SetOutput(stdout) - fs.BoolVar(&inv.Force, "f", false, "force recreation of compiled magefile") - fs.BoolVar(&inv.Verbose, "v", false, "show verbose output when running mage targets") - fs.BoolVar(&inv.List, "l", false, "list mage targets in this directory") - fs.BoolVar(&inv.Help, "h", false, "show this help") - fs.BoolVar(&mageInit, "init", false, "create a starting template if no mage files exist") - fs.DurationVar(&inv.Timeout, "t", 0, "timeout in duration parsable format (e.g. 5m30s)") - fs.BoolVar(&inv.Keep, "keep", false, "keep intermediate mage files around after running") - fs.BoolVar(&showVersion, "version", false, "show version info for the mage binary") - fs.Usage = func() { - fmt.Fprintln(stdout, "mage [options] [target]") - fmt.Fprintln(stdout, "Options:") - fs.PrintDefaults() - } - err = fs.Parse(args) - if err == flag.ErrHelp { - // parse will have already called fs.Usage() - return inv, mageInit, showVersion, err - } - if err == nil && inv.Help && len(fs.Args()) == 0 { - fs.Usage() - // tell upstream, to just exit - return inv, mageInit, showVersion, flag.ErrHelp - } - - // If verbose is still false, we're going to peek at the environment variable to see if - // MAGE_VERBOSE has been set. If so, we're going to use it for the value of MAGE_VERBOSE. - if inv.Verbose == false { - envVerbose, err := strconv.ParseBool(os.Getenv("MAGE_VERBOSE")) - if err == nil { - inv.Verbose = envVerbose - } - } - numFlags := 0 - if inv.Help { - numFlags++ - } - if mageInit { - numFlags++ - } - if showVersion { - numFlags++ - } - - if numFlags > 1 { - return inv, mageInit, showVersion, errors.New("-h, -init, and -version cannot be used simultaneously") - } - - inv.Args = fs.Args() - if inv.Help && len(inv.Args) > 1 { - return inv, mageInit, showVersion, errors.New("-h can only show help for a single target") - } - - return inv, mageInit, showVersion, err -} - -// Invoke runs Mage with the given arguments. -func Invoke(inv Invocation) int { - log := log.New(inv.Stderr, "", 0) - - files, err := Magefiles(inv.Dir) - if err != nil { - log.Println("Error:", err) - return 1 - } - - if len(files) == 0 { - log.Println("No .go files marked with the mage build tag in this directory.") - return 1 - } - - exePath, err := ExeName(files) - - if err != nil { - log.Println("Error:", err) - return 1 - } - - if !inv.Force { - if _, err := os.Stat(exePath); err == nil { - return RunCompiled(inv, exePath) - } - } - - // parse wants dir + filenames... arg - fnames := make([]string, 0, len(files)) - for i := range files { - fnames = append(fnames, filepath.Base(files[i])) - } - - info, err := parse.Package(inv.Dir, fnames) - if err != nil { - log.Println("Error:", err) - return 1 - } - - hasDupes, names := CheckDupes(info) - if hasDupes { - log.Println("Build targets must be case insensitive, thus the follow targets conflict:") - for _, v := range names { - if len(v) > 1 { - log.Println(" " + strings.Join(v, ", ")) - } - } - return 1 - } - - main := filepath.Join(inv.Dir, mainfile) - if err := GenerateMainfile(main, info); err != nil { - log.Println("Error:", err) - return 1 - } - if !inv.Keep { - defer os.Remove(main) - } - files = append(files, main) - if err := Compile(exePath, inv.Stdout, inv.Stderr, files); err != nil { - log.Println("Error:", err) - return 1 - } - if !inv.Keep { - // remove this file before we run the compiled version, in case the - // compiled file screws things up. Yes this doubles up with the above - // defer, that's ok. - os.Remove(main) - } - - return RunCompiled(inv, exePath) -} - -// CheckDupes checks a package for duplicate target names. -func CheckDupes(info *parse.PkgInfo) (hasDupes bool, names map[string][]string) { - names = map[string][]string{} - lowers := map[string]bool{} - for _, f := range info.Funcs { - low := strings.ToLower(f.Name) - if lowers[low] { - hasDupes = true - } - lowers[low] = true - names[low] = append(names[low], f.Name) - } - return hasDupes, names -} - -type data struct { - Funcs []parse.Function - DefaultError bool - Default string - DefaultFunc parse.Function -} - -// Magefiles returns the list of magefiles in dir. -func Magefiles(dir string) ([]string, error) { - ctx := build.Default - ctx.RequiredTags = []string{"mage"} - ctx.BuildTags = []string{"mage"} - p, err := ctx.ImportDir(dir, 0) - if err != nil { - if _, ok := err.(*build.NoGoError); ok { - return []string{}, nil - } - return nil, err - } - for i := range p.GoFiles { - p.GoFiles[i] = filepath.Join(dir, p.GoFiles[i]) - } - return p.GoFiles, nil -} - -// Compile uses the go tool to compile the files into an executable at path. -func Compile(path string, stdout, stderr io.Writer, gofiles []string) error { - c := exec.Command("go", append([]string{"build", "-o", path}, gofiles...)...) - c.Env = os.Environ() - c.Stderr = stderr - c.Stdout = stdout - err := c.Run() - if err != nil { - return errors.New("error compiling magefiles") - } - if _, err := os.Stat(path); err != nil { - return errors.New("failed to find compiled magefile") - } - return nil -} - -// GenerateMainfile creates the mainfile at path with the info from -func GenerateMainfile(path string, info *parse.PkgInfo) error { - f, err := os.Create(path) - if err != nil { - return fmt.Errorf("can't create mainfile: %v", err) - } - defer f.Close() - - data := data{ - Funcs: info.Funcs, - Default: info.DefaultName, - DefaultFunc: info.DefaultFunc, - } - - data.DefaultError = info.DefaultIsError - - if err := output.Execute(f, data); err != nil { - return fmt.Errorf("can't execute mainfile template: %v", err) - } - return nil -} - -// ExeName reports the executable filename that this version of Mage would -// create for the given magefiles. -func ExeName(files []string) (string, error) { - var hashes []string - for _, s := range files { - h, err := hashFile(s) - if err != nil { - return "", err - } - hashes = append(hashes, h) - } - // hash the mainfile template to ensure if it gets updated, we make a new - // binary. - hashes = append(hashes, fmt.Sprintf("%x", sha1.Sum([]byte(tpl)))) - sort.Strings(hashes) - hash := sha1.Sum([]byte(strings.Join(hashes, "") + mageVer)) - filename := fmt.Sprintf("%x", hash) - - out := filepath.Join(mg.CacheDir(), filename) - if runtime.GOOS == "windows" { - out += ".exe" - } - return out, nil -} - -func hashFile(fn string) (string, error) { - f, err := os.Open(fn) - if err != nil { - return "", fmt.Errorf("can't open input file: %v", err) - } - defer f.Close() - - h := sha1.New() - if _, err := io.Copy(h, f); err != nil { - return "", fmt.Errorf("can't write data to hash: %v", err) - } - return fmt.Sprintf("%x", h.Sum(nil)), nil -} - -func generateInit(dir string) error { - f, err := os.Create(filepath.Join(dir, initFile)) - if err != nil { - return fmt.Errorf("could not create mage template: %v", err) - } - defer f.Close() - - if err := initOutput.Execute(f, nil); err != nil { - return fmt.Errorf("can't execute magefile template: %v", err) - } - - return nil -} - -// RunCompiled runs an already-compiled mage command with the given args, -func RunCompiled(inv Invocation, exePath string) int { - c := exec.Command(exePath, inv.Args...) - c.Stderr = inv.Stderr - c.Stdout = inv.Stdout - c.Stdin = inv.Stdin - c.Env = os.Environ() - if inv.Verbose { - c.Env = append(c.Env, "MAGEFILE_VERBOSE=1") - } - if inv.List { - c.Env = append(c.Env, "MAGEFILE_LIST=1") - } - if inv.Help { - c.Env = append(c.Env, "MAGEFILE_HELP=1") - } - if inv.Timeout > 0 { - c.Env = append(c.Env, fmt.Sprintf("MAGEFILE_TIMEOUT=%s", inv.Timeout.String())) - } - return sh.ExitStatus(c.Run()) -} diff --git a/vendor/github.com/magefile/mage/mage/main_test.go b/vendor/github.com/magefile/mage/mage/main_test.go deleted file mode 100644 index 4487334..0000000 --- a/vendor/github.com/magefile/mage/mage/main_test.go +++ /dev/null @@ -1,416 +0,0 @@ -package mage - -import ( - "bytes" - "flag" - "fmt" - "io/ioutil" - "log" - "os" - "os/exec" - "path/filepath" - "strings" - "testing" - "time" - - "github.com/magefile/mage/mg" -) - -func TestMain(m *testing.M) { - os.Exit(testmain(m)) -} - -func testmain(m *testing.M) int { - // ensure we write our temporary binaries to a directory that we'll delete - // after running tests. - dir := "./testing" - abs, err := filepath.Abs(dir) - if err != nil { - log.Fatal(err) - } - if err := os.Setenv(mg.CacheEnv, abs); err != nil { - log.Fatal(err) - } - if err := os.Mkdir(dir, 0700); err != nil { - if os.IsExist(err) { - os.RemoveAll(dir) - } else { - log.Fatal(err) - } - } - defer os.RemoveAll(dir) - return m.Run() -} - -func TestGoRun(t *testing.T) { - c := exec.Command("go", "run", "main.go") - c.Dir = "./testdata" - c.Env = os.Environ() - b, err := c.CombinedOutput() - if err != nil { - t.Error("error:", err) - } - actual := string(b) - expected := "stuff\n" - if actual != expected { - t.Fatalf("expected %q, but got %q", expected, actual) - } -} - -func TestVerbose(t *testing.T) { - stderr := &bytes.Buffer{} - stdout := &bytes.Buffer{} - inv := Invocation{ - Dir: "./testdata", - Stdout: stdout, - Stderr: stderr, - Args: []string{"testverbose"}, - } - - code := Invoke(inv) - if code != 0 { - t.Errorf("expected to exit with code 0, but got %v", code) - } - actual := stdout.String() - expected := "" - if actual != expected { - t.Fatalf("expected %q, but got %q", expected, actual) - } - stderr.Reset() - stdout.Reset() - inv.Verbose = true - code = Invoke(inv) - if code != 0 { - t.Errorf("expected to exit with code 0, but got %v", code) - } - - actual = stderr.String() - expected = "Running target: TestVerbose\nhi!\n" - if actual != expected { - t.Fatalf("expected %q, but got %q", expected, actual) - } -} - -func TestVerboseEnv(t *testing.T) { - os.Setenv("MAGE_VERBOSE", "true") - - stdout := &bytes.Buffer{} - inv, _, _, err := Parse(stdout, []string{}) - if err != nil { - t.Fatal("unexpected error", err) - } - - expected := true - - if inv.Verbose != true { - t.Fatalf("expected %t, but got %t ", expected, inv.Verbose) - } - - os.Unsetenv("MAGE_VERBOSE") -} - -func TestList(t *testing.T) { - stdout := &bytes.Buffer{} - inv := Invocation{ - Dir: "./testdata/list", - Stdout: stdout, - Stderr: ioutil.Discard, - List: true, - } - - code := Invoke(inv) - if code != 0 { - t.Errorf("expected to exit with code 0, but got %v", code) - } - actual := stdout.String() - expected := ` -Targets: - somePig* This is the synopsis for SomePig. - testVerbose - -* default target -`[1:] - - if actual != expected { - t.Logf("expected: %q", expected) - t.Logf(" actual: %q", actual) - t.Fatalf("expected:\n%v\n\ngot:\n%v", expected, actual) - } -} - -func TestNoArgNoDefaultList(t *testing.T) { - stdout := &bytes.Buffer{} - stderr := &bytes.Buffer{} - inv := Invocation{ - Dir: "testdata/no_default", - Stdout: stdout, - Stderr: stderr, - } - code := Invoke(inv) - if code != 0 { - t.Errorf("expected to exit with code 0, but got %v", code) - } - if err := stderr.String(); err != "" { - t.Errorf("unexpected stderr output:\n%s", err) - } - actual := stdout.String() - expected := ` -Targets: - bazBuz Prints out 'BazBuz'. - fooBar Prints out 'FooBar'. -`[1:] - if actual != expected { - t.Fatalf("expected:\n%q\n\ngot:\n%q", expected, actual) - } -} - -func TestTargetError(t *testing.T) { - stderr := &bytes.Buffer{} - inv := Invocation{ - Dir: "./testdata", - Stdout: ioutil.Discard, - Stderr: stderr, - Args: []string{"returnsnonnilerror"}, - } - code := Invoke(inv) - if code != 1 { - t.Fatalf("expected 1, but got %v", code) - } - actual := stderr.String() - expected := "Error: bang!\n" - if actual != expected { - t.Fatalf("expected %q, but got %q", expected, actual) - } -} - -func TestStdinCopy(t *testing.T) { - stdout := &bytes.Buffer{} - stdin := strings.NewReader("hi!") - inv := Invocation{ - Dir: "./testdata", - Stderr: ioutil.Discard, - Stdout: stdout, - Stdin: stdin, - Args: []string{"CopyStdin"}, - } - code := Invoke(inv) - if code != 0 { - t.Fatalf("expected 0, but got %v", code) - } - actual := stdout.String() - expected := "hi!" - if actual != expected { - t.Fatalf("expected %q, but got %q", expected, actual) - } -} - -func TestTargetPanics(t *testing.T) { - stderr := &bytes.Buffer{} - inv := Invocation{ - Dir: "./testdata", - Stdout: ioutil.Discard, - Stderr: stderr, - Args: []string{"panics"}, - } - code := Invoke(inv) - if code != 1 { - t.Fatalf("expected 1, but got %v", code) - } - actual := stderr.String() - expected := "Error: boom!\n" - if actual != expected { - t.Fatalf("expected %q, but got %q", expected, actual) - } -} - -func TestPanicsErr(t *testing.T) { - stderr := &bytes.Buffer{} - inv := Invocation{ - Dir: "./testdata", - Stdout: ioutil.Discard, - Stderr: stderr, - Args: []string{"panicserr"}, - } - code := Invoke(inv) - if code != 1 { - t.Fatalf("expected 1, but got %v", code) - } - actual := stderr.String() - expected := "Error: kaboom!\n" - if actual != expected { - t.Fatalf("expected %q, but got %q", expected, actual) - } -} - -// ensure we include the hash of the mainfile template in determining the -// executable name to run, so we automatically create a new exe if the template -// changes. -func TestHashTemplate(t *testing.T) { - templ := tpl - defer func() { tpl = templ }() - name, err := ExeName([]string{"./testdata/func.go", "./testdata/command.go"}) - if err != nil { - t.Fatal(err) - } - tpl = "some other template" - changed, err := ExeName([]string{"./testdata/func.go", "./testdata/command.go"}) - if changed == name { - t.Fatal("expected executable name to chage if template changed") - } -} - -// Test if the -keep flag does keep the mainfile around after running -func TestKeepFlag(t *testing.T) { - buildFile := fmt.Sprintf("./testdata/keep_flag/%s", mainfile) - os.Remove(buildFile) - defer os.Remove(buildFile) - inv := Invocation{ - Dir: "./testdata/keep_flag", - Stdout: ioutil.Discard, - Stderr: ioutil.Discard, - Args: []string{"noop"}, - Keep: true, - } - code := Invoke(inv) - if code != 0 { - t.Fatalf("expected code 0, but got %v", code) - } - - if _, err := os.Stat(buildFile); err != nil { - t.Fatalf("expected file %q to exist but got err, %v", buildFile, err) - } -} - -func TestMultipleTargets(t *testing.T) { - var stderr, stdout bytes.Buffer - inv := Invocation{ - Dir: "./testdata", - Stdout: &stdout, - Stderr: &stderr, - Args: []string{"TestVerbose", "ReturnsNilError"}, - Verbose: true, - } - code := Invoke(inv) - if code != 0 { - t.Errorf("expected 0, but got %v", code) - } - actual := stderr.String() - expected := "Running target: TestVerbose\nhi!\nRunning target: ReturnsNilError\n" - if actual != expected { - t.Errorf("expected %q, but got %q", expected, actual) - } - actual = stdout.String() - expected = "stuff\n" - if actual != expected { - t.Errorf("expected %q, but got %q", expected, actual) - } -} - -func TestFirstTargetFails(t *testing.T) { - var stderr, stdout bytes.Buffer - inv := Invocation{ - Dir: "./testdata", - Stdout: &stdout, - Stderr: &stderr, - Args: []string{"ReturnsNonNilError", "ReturnsNilError"}, - Verbose: true, - } - code := Invoke(inv) - if code != 1 { - t.Errorf("expected 1, but got %v", code) - } - actual := stderr.String() - expected := "Running target: ReturnsNonNilError\nError: bang!\n" - if actual != expected { - t.Errorf("expected %q, but got %q", expected, actual) - } - actual = stdout.String() - expected = "" - if actual != expected { - t.Errorf("expected %q, but got %q", expected, actual) - } -} - -func TestBadSecondTargets(t *testing.T) { - var stderr, stdout bytes.Buffer - inv := Invocation{ - Dir: "./testdata", - Stdout: &stdout, - Stderr: &stderr, - Args: []string{"TestVerbose", "NotGonnaWork"}, - } - code := Invoke(inv) - if code != 2 { - t.Errorf("expected 0, but got %v", code) - } - actual := stderr.String() - expected := "Unknown target specified: NotGonnaWork\n" - if actual != expected { - t.Errorf("expected %q, but got %q", expected, actual) - } - actual = stdout.String() - expected = "" - if actual != expected { - t.Errorf("expected %q, but got %q", expected, actual) - } -} - -func TestParse(t *testing.T) { - buf := &bytes.Buffer{} - inv, init, showVer, err := Parse(buf, []string{"-v", "build"}) - if err != nil { - t.Fatal("unexpected error", err) - } - if init { - t.Fatal("init should be false but was true") - } - if showVer { - t.Fatal("showVersion should be false but was true") - } - if len(inv.Args) != 1 && inv.Args[0] != "build" { - t.Fatalf("expected args to be %q but got %q", []string{"build"}, inv.Args) - } - if s := buf.String(); s != "" { - t.Fatalf("expected no stdout output but got %q", s) - } - -} - -// Test the timeout option -func TestTimeout(t *testing.T) { - stderr := &bytes.Buffer{} - inv := Invocation{ - Dir: "./testdata/context", - Stdout: ioutil.Discard, - Stderr: stderr, - Args: []string{"timeout"}, - Timeout: time.Duration(100 * time.Millisecond), - } - code := Invoke(inv) - if code != 1 { - t.Fatalf("expected 1, but got %v", code) - } - actual := stderr.String() - expected := "Error: context deadline exceeded\n" - - if actual != expected { - t.Fatalf("expected %q, but got %q", expected, actual) - } -} -func TestParseHelp(t *testing.T) { - buf := &bytes.Buffer{} - _, _, _, err := Parse(buf, []string{"-h"}) - if err != flag.ErrHelp { - t.Fatal("unexpected error", err) - } - buf2 := &bytes.Buffer{} - _, _, _, err = Parse(buf2, []string{"--help"}) - if err != flag.ErrHelp { - t.Fatal("unexpected error", err) - } - s := buf.String() - s2 := buf2.String() - if s != s2 { - t.Fatalf("expected -h and --help to produce same output, but got different.\n\n-h:\n%s\n\n--help:\n%s", s, s2) - } -} diff --git a/vendor/github.com/magefile/mage/mage/template.go b/vendor/github.com/magefile/mage/mage/template.go deleted file mode 100644 index e382733..0000000 --- a/vendor/github.com/magefile/mage/mage/template.go +++ /dev/null @@ -1,155 +0,0 @@ -package mage - -// var only for tests -var tpl = `// +build ignore - -package main - -import ( - "context" - "fmt" - "io/ioutil" - "log" - "os" - "strings" - "text/tabwriter" - - "github.com/magefile/mage/mg" -) - -func main() { - log.SetFlags(0) - if os.Getenv("MAGEFILE_VERBOSE") == "" { - log.SetOutput(ioutil.Discard) - } - logger := log.New(os.Stderr, "", 0) - if os.Getenv("MAGEFILE_LIST") != "" { - if err := list(); err != nil { - log.Println(err) - os.Exit(1) - } - return - } - - targets := map[string]bool { - {{range .Funcs}}"{{lower .Name}}": true, - {{end}} - } - - var unknown []string - for _, arg := range os.Args[1:] { - if !targets[strings.ToLower(arg)] { - unknown = append(unknown, arg) - } - } - if len(unknown) == 1 { - logger.Println("Unknown target specified:", unknown[0]) - os.Exit(2) - } - if len(unknown) > 1 { - logger.Println("Unknown targets specified:", strings.Join(unknown, ", ")) - os.Exit(2) - } - - if os.Getenv("MAGEFILE_HELP") != "" { - if len(os.Args) < 2 { - logger.Println("no target specified") - os.Exit(1) - } - switch strings.ToLower(os.Args[1]) { - {{range .Funcs}}case "{{lower .Name}}": - fmt.Print("mage {{lower .Name}}:\n\n") - fmt.Println({{printf "%q" .Comment}}) - return - {{end}} - default: - logger.Printf("Unknown target: %q\n", os.Args[1]) - os.Exit(1) - } - } - - - if len(os.Args) < 2 { - {{- if .Default}} - {{.DefaultFunc.TemplateString}} - handleError(logger, err) - return - {{- else}} - if err := list(); err != nil { - logger.Println("Error:", err) - os.Exit(1) - } - return - {{- end}} - } - for _, target := range os.Args[1:] { - switch strings.ToLower(target) { - {{range .Funcs }} - case "{{lower .Name}}": - if os.Getenv("MAGEFILE_VERBOSE") != "" { - logger.Println("Running target:", "{{.Name}}") - } - {{.TemplateString}} - handleError(logger, err) - {{- end}} - default: - // should be impossible since we check this above. - logger.Printf("Unknown target: %q\n", os.Args[1]) - os.Exit(1) - } - } -} - -func list() error { - {{- $default := .Default}} - w := tabwriter.NewWriter(os.Stdout, 0, 4, 4, ' ', 0) - fmt.Println("Targets:") - {{- range .Funcs}} - fmt.Fprintln(w, " {{lowerfirst .Name}}{{if eq .Name $default}}*{{end}}\t" + {{printf "%q" .Synopsis}}) - {{- end}} - err := w.Flush() - {{- if .Default}} - if err == nil { - fmt.Println("\n* default target") - } - {{- end}} - return err -} - -func handleError(logger *log.Logger, err interface{}) { - if err != nil { - logger.Printf("Error: %v\n", err) - type code interface { - ExitStatus() int - } - if c, ok := err.(code); ok { - os.Exit(c.ExitStatus()) - } - os.Exit(1) - } -} - -func runTarget(fn func(context.Context) error) interface{} { - var err interface{} - ctx, cancel := mg.Context() - d := make(chan interface{}) - go func() { - defer func() { - err := recover() - d <- err - }() - err := fn(ctx) - d <- err - }() - select { - case <-ctx.Done(): - cancel() - e := ctx.Err() - fmt.Printf("ctx err: %v\n", e) - return e - case err = <-d: - cancel() - return err - } -} -` diff --git a/vendor/github.com/magefile/mage/mage/testdata/command.go b/vendor/github.com/magefile/mage/mage/testdata/command.go deleted file mode 100644 index ac2b735..0000000 --- a/vendor/github.com/magefile/mage/mage/testdata/command.go +++ /dev/null @@ -1,29 +0,0 @@ -// +build mage - -package main - -import ( - "fmt" - "log" - - "github.com/magefile/mage/mg" -) - -// This should work as a default - even if it's in a different file -var Default = ReturnsNilError - -// this should not be a target because it returns a string -func ReturnsString() string { - fmt.Println("more stuff") - return "" -} - -func TestVerbose() { - log.Println("hi!") -} - -func ReturnsVoid() { - mg.Deps(f) -} - -func f() {} diff --git a/vendor/github.com/magefile/mage/mage/testdata/context/context.go b/vendor/github.com/magefile/mage/mage/testdata/context/context.go deleted file mode 100644 index 61e777f..0000000 --- a/vendor/github.com/magefile/mage/mage/testdata/context/context.go +++ /dev/null @@ -1,30 +0,0 @@ -// +build mage - -package main - -import ( - "context" - "errors" - "fmt" - "time" - - "github.com/magefile/mage/mg" -) - -// Returns a non-nil error. -func TakesContextNoError(ctx context.Context) { - deadline, _ := ctx.Deadline() - fmt.Printf("Context timeout: %v\n", deadline) -} - -func Timeout(ctx context.Context) { - time.Sleep(200 * time.Millisecond) -} - -func TakesContextWithError(ctx context.Context) error { - return errors.New("Something went sideways") -} - -func CtxDeps(ctx context.Context) { - mg.CtxDeps(ctx, TakesContextNoError) -} diff --git a/vendor/github.com/magefile/mage/mage/testdata/error.go b/vendor/github.com/magefile/mage/mage/testdata/error.go deleted file mode 100644 index bb98a09..0000000 --- a/vendor/github.com/magefile/mage/mage/testdata/error.go +++ /dev/null @@ -1,10 +0,0 @@ -// +build mage - -package main - -import "errors" - -// Returns a non-nil error. -func ReturnsNonNilError() error { - return errors.New("bang!") -} diff --git a/vendor/github.com/magefile/mage/mage/testdata/func.go b/vendor/github.com/magefile/mage/mage/testdata/func.go deleted file mode 100644 index b33fe4b..0000000 --- a/vendor/github.com/magefile/mage/mage/testdata/func.go +++ /dev/null @@ -1,23 +0,0 @@ -// +build mage - -package main - -import ( - "fmt" - "io" - "os" -) - -// Synopsis for "returns" error. -// And some more text. -func ReturnsNilError() error { - fmt.Println("stuff") - return nil -} - -func CopyStdin() error { - _, err := io.Copy(os.Stdout, os.Stdin) - return err -} - -func nonexported() {} diff --git a/vendor/github.com/magefile/mage/mage/testdata/keep_flag/magefile.go b/vendor/github.com/magefile/mage/mage/testdata/keep_flag/magefile.go deleted file mode 100644 index ce97b22..0000000 --- a/vendor/github.com/magefile/mage/mage/testdata/keep_flag/magefile.go +++ /dev/null @@ -1,5 +0,0 @@ -// +build mage - -package main - -func Noop() {} diff --git a/vendor/github.com/magefile/mage/mage/testdata/list/command.go b/vendor/github.com/magefile/mage/mage/testdata/list/command.go deleted file mode 100644 index 3822a80..0000000 --- a/vendor/github.com/magefile/mage/mage/testdata/list/command.go +++ /dev/null @@ -1,29 +0,0 @@ -// +build mage - -package main - -import ( - "fmt" - "log" - - "github.com/magefile/mage/mg" -) - -var Default = SomePig - -// this should not be a target because it returns a string -func ReturnsString() string { - fmt.Println("more stuff") - return "" -} - -func TestVerbose() { - log.Println("hi!") -} - -// This is the synopsis for SomePig. There's more data that won't show up. -func SomePig() { - mg.Deps(f) -} - -func f() {} diff --git a/vendor/github.com/magefile/mage/mage/testdata/main.go b/vendor/github.com/magefile/mage/mage/testdata/main.go deleted file mode 100644 index a3f23b4..0000000 --- a/vendor/github.com/magefile/mage/mage/testdata/main.go +++ /dev/null @@ -1,13 +0,0 @@ -// +build ignore - -package main - -import ( - "os" - - "github.com/magefile/mage/mage" -) - -func main() { - os.Exit(mage.Main()) -} diff --git a/vendor/github.com/magefile/mage/mage/testdata/no_default/magefile.go b/vendor/github.com/magefile/mage/mage/testdata/no_default/magefile.go deleted file mode 100644 index 1c440bf..0000000 --- a/vendor/github.com/magefile/mage/mage/testdata/no_default/magefile.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build mage - -package main - -import ( - "fmt" -) - -// No default so we can check the list(). - -// Prints out 'FooBar'. -func FooBar() { - fmt.Println("FooBar") -} - -// Prints out 'BazBuz'. -func BazBuz() { - fmt.Println("BazBuz") -} diff --git a/vendor/github.com/magefile/mage/mage/testdata/panic.go b/vendor/github.com/magefile/mage/mage/testdata/panic.go deleted file mode 100644 index 3714c0d..0000000 --- a/vendor/github.com/magefile/mage/mage/testdata/panic.go +++ /dev/null @@ -1,15 +0,0 @@ -// +build mage - -package main - -import "errors" - -// Function that panics. -func Panics() { - panic("boom!") -} - -// Error function that panics. -func PanicsErr() error { - panic(errors.New("kaboom!")) -} diff --git a/vendor/github.com/magefile/mage/parse/import_go1.9.go b/vendor/github.com/magefile/mage/parse/import_go1.9.go deleted file mode 100644 index 9b5c712..0000000 --- a/vendor/github.com/magefile/mage/parse/import_go1.9.go +++ /dev/null @@ -1,13 +0,0 @@ -// +build go1.9 - -package parse - -import ( - "go/importer" - "go/token" - "go/types" -) - -func getImporter(*token.FileSet) types.Importer { - return importer.For("source", nil) -} diff --git a/vendor/github.com/magefile/mage/parse/import_not_go1.9.go b/vendor/github.com/magefile/mage/parse/import_not_go1.9.go deleted file mode 100644 index ed4e951..0000000 --- a/vendor/github.com/magefile/mage/parse/import_not_go1.9.go +++ /dev/null @@ -1,15 +0,0 @@ -// +build !go1.9 - -package parse - -import ( - "go/build" - "go/token" - "go/types" - - "github.com/magefile/mage/parse/srcimporter" -) - -func getImporter(fset *token.FileSet) types.Importer { - return srcimporter.New(&build.Default, fset, make(map[string]*types.Package)) -} diff --git a/vendor/github.com/magefile/mage/parse/parse.go b/vendor/github.com/magefile/mage/parse/parse.go deleted file mode 100644 index 6efeca0..0000000 --- a/vendor/github.com/magefile/mage/parse/parse.go +++ /dev/null @@ -1,283 +0,0 @@ -package parse - -import ( - "fmt" - "go/ast" - "go/build" - "go/doc" - "go/parser" - "go/token" - "go/types" - "log" - "os" - "os/exec" - "strings" - - mgTypes "github.com/magefile/mage/types" -) - -type PkgInfo struct { - Funcs []Function - DefaultIsError bool - DefaultIsContext bool - DefaultName string - DefaultFunc Function -} - -// Function represented a job function from a mage file -type Function struct { - Name string - IsError bool - IsContext bool - Synopsis string - Comment string -} - -// TemplateString returns code for the template switch to run the target. -// It wraps each target call to match the func(context.Context) error that -// runTarget requires. -func (f Function) TemplateString() string { - if f.IsContext && f.IsError { - out := `wrapFn := func(ctx context.Context) error { - return %s(ctx) - } - err := runTarget(wrapFn)` - return fmt.Sprintf(out, f.Name) - } - if f.IsContext && !f.IsError { - out := `wrapFn := func(ctx context.Context) error { - %s(ctx) - return nil - } - err := runTarget(wrapFn)` - return fmt.Sprintf(out, f.Name) - } - if !f.IsContext && f.IsError { - out := `wrapFn := func(ctx context.Context) error { - return %s() - } - err := runTarget(wrapFn)` - return fmt.Sprintf(out, f.Name) - } - if !f.IsContext && !f.IsError { - out := `wrapFn := func(ctx context.Context) error { - %s() - return nil - } - err := runTarget(wrapFn)` - return fmt.Sprintf(out, f.Name) - } - return `fmt.Printf("Error formatting job code\n") - os.Exit(1)` -} - -// Package parses a package -func Package(path string, files []string) (*PkgInfo, error) { - fset := token.NewFileSet() - - pkg, err := getPackage(path, files, fset) - if err != nil { - return nil, err - } - - info, err := makeInfo(path, fset, pkg.Files) - if err != nil { - return nil, err - } - - pi := &PkgInfo{} - - p := doc.New(pkg, "./", 0) - for _, f := range p.Funcs { - if f.Recv != "" { - // skip methods - continue - } - if !ast.IsExported(f.Name) { - // skip non-exported functions - continue - } - if typ := voidOrError(f.Decl.Type, info); typ != mgTypes.InvalidType { - pi.Funcs = append(pi.Funcs, Function{ - Name: f.Name, - Comment: f.Doc, - Synopsis: doc.Synopsis(f.Doc), - IsError: typ == mgTypes.ErrorType || typ == mgTypes.ContextErrorType, - IsContext: typ == mgTypes.ContextVoidType || typ == mgTypes.ContextErrorType, - }) - } - } - - setDefault(p, pi, info) - - return pi, nil -} - -func setDefault(p *doc.Package, pi *PkgInfo, info types.Info) { - for _, v := range p.Vars { - for x, name := range v.Names { - if name != "Default" { - continue - } - spec := v.Decl.Specs[x].(*ast.ValueSpec) - if len(spec.Values) != 1 { - log.Println("warning: default declaration has multiple values") - } - id, ok := spec.Values[0].(*ast.Ident) - if !ok { - log.Println("warning: default declaration is not a function name") - } - for _, f := range pi.Funcs { - if f.Name == id.Name { - pi.DefaultName = f.Name - pi.DefaultIsError = f.IsError - pi.DefaultIsContext = f.IsContext - pi.DefaultFunc = f - return - } - } - log.Println("warning: default declaration does not reference a mage target") - } - } -} - -// getPackage returns the non-test package at the given path. -func getPackage(path string, files []string, fset *token.FileSet) (*ast.Package, error) { - fm := make(map[string]bool, len(files)) - for _, f := range files { - fm[f] = true - } - - filter := func(f os.FileInfo) bool { - return fm[f.Name()] - } - - pkgs, err := parser.ParseDir(fset, path, filter, parser.ParseComments) - if err != nil { - return nil, fmt.Errorf("failed to parse directory: %v", err) - } - - for name, pkg := range pkgs { - if !strings.HasSuffix(name, "_test") { - return pkg, nil - } - } - return nil, fmt.Errorf("no non-test packages found in %s", path) -} - -func makeInfo(dir string, fset *token.FileSet, files map[string]*ast.File) (types.Info, error) { - goroot := os.Getenv("GOROOT") - if goroot == "" { - c := exec.Command("go", "env", "GOROOT") - b, err := c.Output() - if err != nil { - return types.Info{}, fmt.Errorf("failed to get GOROOT from 'go env': %v", err) - } - goroot = strings.TrimSpace(string(b)) - if goroot == "" { - return types.Info{}, fmt.Errorf("could not determine GOROOT") - } - } - - build.Default.GOROOT = goroot - - cfg := types.Config{ - Importer: getImporter(fset), - } - - info := types.Info{ - Types: make(map[ast.Expr]types.TypeAndValue), - Defs: make(map[*ast.Ident]types.Object), - Uses: make(map[*ast.Ident]types.Object), - } - - fs := make([]*ast.File, 0, len(files)) - for _, v := range files { - fs = append(fs, v) - } - - _, err := cfg.Check(dir, fset, fs, &info) - if err != nil { - return info, fmt.Errorf("failed to check types in directory: %v", err) - } - return info, nil -} - -// errorOrVoid filters the list of functions to only those that return only an -// error or have no return value, and have no paramters. -func errorOrVoid(fns []*ast.FuncDecl, info types.Info) []*ast.FuncDecl { - fds := []*ast.FuncDecl{} - - for _, fn := range fns { - if voidOrError(fn.Type, info) != mgTypes.InvalidType { - fds = append(fds, fn) - } - } - return fds -} - -// FuncType is the type of a function that mage understands. -type FuncType int - -// FuncTypes -const ( - InvalidType FuncType = iota - VoidType - ErrorType - ContextVoidType - ContextErrorType -) - -func hasContextParam(ft *ast.FuncType, info types.Info) bool { - if ft.Params.NumFields() == 1 { - ret := ft.Params.List[0] - t := info.TypeOf(ret.Type) - if t != nil && t.String() == "context.Context" { - return true - } - } - return false -} - -func hasVoidReturn(ft *ast.FuncType, info types.Info) bool { - res := ft.Results - if res.NumFields() == 0 { - return true - } - return false -} - -func hasErrorReturn(ft *ast.FuncType, info types.Info) bool { - res := ft.Results - if res.NumFields() == 1 { - ret := res.List[0] - if len(ret.Names) > 1 { - return false - } - t := info.TypeOf(ret.Type) - if t != nil && t.String() == "error" { - return true - } - } - return false -} - -func voidOrError(ft *ast.FuncType, info types.Info) mgTypes.FuncType { - if hasContextParam(ft, info) { - if hasVoidReturn(ft, info) { - return mgTypes.ContextVoidType - } - if hasErrorReturn(ft, info) { - return mgTypes.ContextErrorType - } - } - if ft.Params.NumFields() == 0 { - if hasVoidReturn(ft, info) { - return mgTypes.VoidType - } - if hasErrorReturn(ft, info) { - return mgTypes.ErrorType - } - } - return mgTypes.InvalidType -} diff --git a/vendor/github.com/magefile/mage/parse/parse_test.go b/vendor/github.com/magefile/mage/parse/parse_test.go deleted file mode 100644 index 3107a57..0000000 --- a/vendor/github.com/magefile/mage/parse/parse_test.go +++ /dev/null @@ -1,58 +0,0 @@ -package parse - -import ( - "reflect" - "testing" -) - -func TestParse(t *testing.T) { - info, err := Package("./testdata", []string{"func.go", "command.go"}) - if err != nil { - t.Fatal(err) - } - - expected := []Function{ - { - Name: "ReturnsNilError", - IsError: true, - Comment: "Synopsis for \"returns\" error.\nAnd some more text.\n", - Synopsis: `Synopsis for "returns" error.`, - }, - { - Name: "ReturnsVoid", - }, - { - Name: "TakesContextReturnsError", - IsError: true, - IsContext: true, - }, - { - Name: "TakesContextReturnsVoid", - IsError: false, - IsContext: true, - }, - } - - // DefaultIsError - if info.DefaultIsError != true { - t.Fatalf("expected DefaultIsError to be true") - } - - // DefaultName - if info.DefaultName != "ReturnsNilError" { - t.Fatalf("expected DefaultName to be ReturnsNilError") - } - - for _, fn := range expected { - found := false - for _, infoFn := range info.Funcs { - if reflect.DeepEqual(fn, infoFn) { - found = true - break - } - } - if !found { - t.Fatalf("expected:\n%#v\n\nto be in:\n%#v", fn, info.Funcs) - } - } -} diff --git a/vendor/github.com/magefile/mage/parse/srcimporter/sizes.go b/vendor/github.com/magefile/mage/parse/srcimporter/sizes.go deleted file mode 100644 index a9e1b32..0000000 --- a/vendor/github.com/magefile/mage/parse/srcimporter/sizes.go +++ /dev/null @@ -1,40 +0,0 @@ -// +build !go1.9 - -package srcimporter - -import "go/types" - -// common architecture word sizes and alignments -var gcArchSizes = map[string]*types.StdSizes{ - "386": {4, 4}, - "arm": {4, 4}, - "arm64": {8, 8}, - "amd64": {8, 8}, - "amd64p32": {4, 8}, - "mips": {4, 4}, - "mipsle": {4, 4}, - "mips64": {8, 8}, - "mips64le": {8, 8}, - "ppc64": {8, 8}, - "ppc64le": {8, 8}, - "s390x": {8, 8}, - // When adding more architectures here, - // update the doc string of SizesFor below. -} - -// SizesFor returns the Sizes used by a compiler for an architecture. -// The result is nil if a compiler/architecture pair is not known. -// -// Supported architectures for compiler "gc": -// "386", "arm", "arm64", "amd64", "amd64p32", "mips", "mipsle", -// "mips64", "mips64le", "ppc64", "ppc64le", "s390x". -func SizesFor(compiler, arch string) types.Sizes { - if compiler != "gc" { - return nil - } - s, ok := gcArchSizes[arch] - if !ok { - return nil - } - return s -} diff --git a/vendor/github.com/magefile/mage/parse/srcimporter/srcimporter.go b/vendor/github.com/magefile/mage/parse/srcimporter/srcimporter.go deleted file mode 100644 index a488a99..0000000 --- a/vendor/github.com/magefile/mage/parse/srcimporter/srcimporter.go +++ /dev/null @@ -1,213 +0,0 @@ -// +build !go1.9 - -// Copyright 2017 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 srcimporter implements importing directly -// from source files rather than installed packages. -package srcimporter - -import ( - "fmt" - "go/ast" - "go/build" - "go/parser" - "go/token" - "go/types" - "path/filepath" - "sync" -) - -// An Importer provides the context for importing packages from source code. -type Importer struct { - ctxt *build.Context - fset *token.FileSet - sizes types.Sizes - packages map[string]*types.Package -} - -// NewImporter returns a new Importer for the given context, file set, and map -// of packages. The context is used to resolve import paths to package paths, -// and identifying the files belonging to the package. If the context provides -// non-nil file system functions, they are used instead of the regular package -// os functions. The file set is used to track position information of package -// files; and imported packages are added to the packages map. -func New(ctxt *build.Context, fset *token.FileSet, packages map[string]*types.Package) *Importer { - return &Importer{ - ctxt: ctxt, - fset: fset, - sizes: SizesFor(ctxt.Compiler, ctxt.GOARCH), // uses go/types default if GOARCH not found - packages: packages, - } -} - -// Importing is a sentinel taking the place in Importer.packages -// for a package that is in the process of being imported. -var importing types.Package - -// Import(path) is a shortcut for ImportFrom(path, "", 0). -func (p *Importer) Import(path string) (*types.Package, error) { - return p.ImportFrom(path, "", 0) -} - -// ImportFrom imports the package with the given import path resolved from the given srcDir, -// adds the new package to the set of packages maintained by the importer, and returns the -// package. Package path resolution and file system operations are controlled by the context -// maintained with the importer. The import mode must be zero but is otherwise ignored. -// Packages that are not comprised entirely of pure Go files may fail to import because the -// type checker may not be able to determine all exported entities (e.g. due to cgo dependencies). -func (p *Importer) ImportFrom(path, srcDir string, mode types.ImportMode) (*types.Package, error) { - if mode != 0 { - panic("non-zero import mode") - } - - // determine package path (do vendor resolution) - var bp *build.Package - var err error - switch { - default: - if abs, err := p.absPath(srcDir); err == nil { // see issue #14282 - srcDir = abs - } - bp, err = p.ctxt.Import(path, srcDir, build.FindOnly) - - case build.IsLocalImport(path): - // "./x" -> "srcDir/x" - bp, err = p.ctxt.ImportDir(filepath.Join(srcDir, path), build.FindOnly) - - case p.isAbsPath(path): - return nil, fmt.Errorf("invalid absolute import path %q", path) - } - if err != nil { - return nil, err // err may be *build.NoGoError - return as is - } - - // package unsafe is known to the type checker - if bp.ImportPath == "unsafe" { - return types.Unsafe, nil - } - - // no need to re-import if the package was imported completely before - pkg := p.packages[bp.ImportPath] - if pkg != nil { - if pkg == &importing { - return nil, fmt.Errorf("import cycle through package %q", bp.ImportPath) - } - if !pkg.Complete() { - // Package exists but is not complete - we cannot handle this - // at the moment since the source importer replaces the package - // wholesale rather than augmenting it (see #19337 for details). - // Return incomplete package with error (see #16088). - return pkg, fmt.Errorf("reimported partially imported package %q", bp.ImportPath) - } - return pkg, nil - } - - p.packages[bp.ImportPath] = &importing - defer func() { - // clean up in case of error - // TODO(gri) Eventually we may want to leave a (possibly empty) - // package in the map in all cases (and use that package to - // identify cycles). See also issue 16088. - if p.packages[bp.ImportPath] == &importing { - p.packages[bp.ImportPath] = nil - } - }() - - // collect package files - bp, err = p.ctxt.ImportDir(bp.Dir, 0) - if err != nil { - return nil, err // err may be *build.NoGoError - return as is - } - var filenames []string - filenames = append(filenames, bp.GoFiles...) - filenames = append(filenames, bp.CgoFiles...) - - files, err := p.parseFiles(bp.Dir, filenames) - if err != nil { - return nil, err - } - - // type-check package files - conf := types.Config{ - IgnoreFuncBodies: true, - FakeImportC: true, - Importer: p, - Sizes: p.sizes, - } - pkg, err = conf.Check(bp.ImportPath, p.fset, files, nil) - if err != nil { - // Type-checking stops after the first error (types.Config.Error is not set), - // so the returned package is very likely incomplete. Don't return it since - // we don't know its condition: It's very likely unsafe to use and it's also - // not added to p.packages which may cause further problems (issue #20837). - return nil, fmt.Errorf("type-checking package %q failed (%v)", bp.ImportPath, err) - } - - p.packages[bp.ImportPath] = pkg - return pkg, nil -} - -func (p *Importer) parseFiles(dir string, filenames []string) ([]*ast.File, error) { - open := p.ctxt.OpenFile // possibly nil - - files := make([]*ast.File, len(filenames)) - errors := make([]error, len(filenames)) - - var wg sync.WaitGroup - wg.Add(len(filenames)) - for i, filename := range filenames { - go func(i int, filepath string) { - defer wg.Done() - if open != nil { - src, err := open(filepath) - if err != nil { - errors[i] = fmt.Errorf("opening package file %s failed (%v)", filepath, err) - return - } - files[i], errors[i] = parser.ParseFile(p.fset, filepath, src, 0) - src.Close() // ignore Close error - parsing may have succeeded which is all we need - } else { - // Special-case when ctxt doesn't provide a custom OpenFile and use the - // parser's file reading mechanism directly. This appears to be quite a - // bit faster than opening the file and providing an io.ReaderCloser in - // both cases. - // TODO(gri) investigate performance difference (issue #19281) - files[i], errors[i] = parser.ParseFile(p.fset, filepath, nil, 0) - } - }(i, p.joinPath(dir, filename)) - } - wg.Wait() - - // if there are errors, return the first one for deterministic results - for _, err := range errors { - if err != nil { - return nil, err - } - } - - return files, nil -} - -// context-controlled file system operations - -func (p *Importer) absPath(path string) (string, error) { - // TODO(gri) This should be using p.ctxt.AbsPath which doesn't - // exist but probably should. See also issue #14282. - return filepath.Abs(path) -} - -func (p *Importer) isAbsPath(path string) bool { - if f := p.ctxt.IsAbsPath; f != nil { - return f(path) - } - return filepath.IsAbs(path) -} - -func (p *Importer) joinPath(elem ...string) string { - if f := p.ctxt.JoinPath; f != nil { - return f(elem...) - } - return filepath.Join(elem...) -} diff --git a/vendor/github.com/magefile/mage/parse/testdata/command.go b/vendor/github.com/magefile/mage/parse/testdata/command.go deleted file mode 100644 index d8e6f74..0000000 --- a/vendor/github.com/magefile/mage/parse/testdata/command.go +++ /dev/null @@ -1,33 +0,0 @@ -// +build mage - -package main - -import ( - "context" - "fmt" - - "github.com/magefile/mage/mg" -) - -// This should work as a default - even if it's in a different file -var Default = ReturnsNilError - -// this should not be a target because it returns a string -func ReturnsString() string { - fmt.Println("more stuff") - return "" -} - -func ReturnsVoid() { - mg.Deps(f) -} - -func f() {} - -func TakesContextReturnsVoid(ctx context.Context) { - -} - -func TakesContextReturnsError(ctx context.Context) error { - return nil -} diff --git a/vendor/github.com/magefile/mage/parse/testdata/func.go b/vendor/github.com/magefile/mage/parse/testdata/func.go deleted file mode 100644 index 9492775..0000000 --- a/vendor/github.com/magefile/mage/parse/testdata/func.go +++ /dev/null @@ -1,14 +0,0 @@ -// +build mage - -package main - -import "fmt" - -// Synopsis for "returns" error. -// And some more text. -func ReturnsNilError() error { - fmt.Println("stuff") - return nil -} - -func nonexported() {} diff --git a/vendor/github.com/magefile/mage/sh/cmd.go b/vendor/github.com/magefile/mage/sh/cmd.go deleted file mode 100644 index 23fc372..0000000 --- a/vendor/github.com/magefile/mage/sh/cmd.go +++ /dev/null @@ -1,165 +0,0 @@ -package sh - -import ( - "bytes" - "fmt" - "io" - "log" - "os" - "os/exec" - "strings" - - "github.com/magefile/mage/mg" -) - -// RunCmd returns a function that will call Run with the given command. This is -// useful for creating command aliases to make your scripts easier to read, like -// this: -// -// // in a helper file somewhere -// var g0 = sh.RunCmd("go") // go is a keyword :( -// -// // somewhere in your main code -// if err := g0("install", "github.com/gohugo/hugo"); err != nil { -// return err -// } -// -// Args passed to command get baked in as args to the command when you run it. -// Any args passed in when you run the returned function will be appended to the -// original args. For example, this is equivalent to the above: -// -// var goInstall = sh.RunCmd("go", "install") goInstall("github.com/gohugo/hugo") -// -// RunCmd uses Exec underneath, so see those docs for more details. -func RunCmd(cmd string, args ...string) func(args ...string) error { - return func(args2 ...string) error { - return Run(cmd, append(args, args2...)...) - } -} - -// OutCmd is like RunCmd except the command returns the output of the -// command. -func OutCmd(cmd string, args ...string) func(args ...string) (string, error) { - return func(args2 ...string) (string, error) { - return Output(cmd, append(args, args2...)...) - } -} - -// Run is like RunWith, but doesn't specify any environment variables. -func Run(cmd string, args ...string) error { - return RunWith(nil, cmd, args...) -} - -// RunV is like Run, but always sends the command's stdout to os.Stdout. -func RunV(cmd string, args ...string) error { - _, err := Exec(nil, os.Stdout, os.Stderr, cmd, args...) - return err -} - -// RunWith runs the given command, directing stderr to this program's stderr and -// printing stdout to stdout if mage was run with -v. It adds adds env to the -// environment variables for the command being run. Environment variables should -// be in the format name=value. -func RunWith(env map[string]string, cmd string, args ...string) error { - var output io.Writer - if mg.Verbose() { - output = os.Stdout - } - _, err := Exec(env, output, os.Stderr, cmd, args...) - return err -} - -// Output runs the command and returns the text from stdout. -func Output(cmd string, args ...string) (string, error) { - buf := &bytes.Buffer{} - _, err := Exec(nil, buf, os.Stderr, cmd, args...) - return strings.TrimSuffix(buf.String(), "\n"), err -} - -// OutputWith is like RunWith, ubt returns what is written to stdout. -func OutputWith(env map[string]string, cmd string, args ...string) (string, error) { - buf := &bytes.Buffer{} - _, err := Exec(env, buf, os.Stderr, cmd, args...) - return strings.TrimSuffix(buf.String(), "\n"), err -} - -// Exec executes the command, piping its stderr to mage's stderr and -// piping its stdout to the given writer. If the command fails, it will return -// an error that, if returned from a target or mg.Deps call, will cause mage to -// exit with the same code as the command failed with. Env is a list of -// environment variables to set when running the command, these override the -// current environment variables set (which are also passed to the command). cmd -// and args may include references to environment variables in $FOO format, in -// which case these will be expanded before the command is run. -// -// Ran reports if the command ran (rather than was not found or not executable). -// Code reports the exit code the command returned if it ran. If err == nil, ran -// is always true and code is always 0. -func Exec(env map[string]string, stdout, stderr io.Writer, cmd string, args ...string) (ran bool, err error) { - expand := func(s string) string { - s2, ok := env[s] - if ok { - return s2 - } - return os.Getenv(s) - } - cmd = os.Expand(cmd, expand) - for i := range args { - args[i] = os.Expand(args[i], expand) - } - ran, code, err := run(env, stdout, stderr, cmd, args...) - if err == nil { - return true, nil - } - if ran { - return ran, mg.Fatalf(code, `running "%s %s" failed with exit code %d`, cmd, strings.Join(args, " "), code) - } - return ran, fmt.Errorf(`failed to run "%s %s: %v"`, cmd, strings.Join(args, " "), err) -} - -func run(env map[string]string, stdout, stderr io.Writer, cmd string, args ...string) (ran bool, code int, err error) { - c := exec.Command(cmd, args...) - c.Env = os.Environ() - for k, v := range env { - c.Env = append(c.Env, k+"="+v) - } - c.Stderr = stderr - c.Stdout = stdout - c.Stdin = os.Stdin - log.Println("exec:", cmd, strings.Join(args, " ")) - err = c.Run() - return cmdRan(err), ExitStatus(err), err -} - -func cmdRan(err error) bool { - if err == nil { - return true - } - ee, ok := err.(*exec.ExitError) - if ok { - return ee.Exited() - } - return false -} - -type exitStatus interface { - ExitStatus() int -} - -// ExitStatus returns the exit status of the error if it is an exec.ExitError -// or if it implements ExitStatus() int. -// 0 if it is nil or 1 if it is a different error. -func ExitStatus(err error) int { - if err == nil { - return 0 - } - if e, ok := err.(exitStatus); ok { - return e.ExitStatus() - } - if e, ok := err.(*exec.ExitError); ok { - if ex, ok := e.Sys().(exitStatus); ok { - return ex.ExitStatus() - } - } - return 1 -} diff --git a/vendor/github.com/magefile/mage/sh/cmd_test.go b/vendor/github.com/magefile/mage/sh/cmd_test.go deleted file mode 100644 index c2f5d04..0000000 --- a/vendor/github.com/magefile/mage/sh/cmd_test.go +++ /dev/null @@ -1,72 +0,0 @@ -package sh - -import ( - "bytes" - "os" - "testing" -) - -func TestOutCmd(t *testing.T) { - cmd := OutCmd(os.Args[0], "-printArgs", "foo", "bar") - out, err := cmd("baz", "bat") - if err != nil { - t.Fatal(err) - } - expected := "[foo bar baz bat]" - if out != expected { - t.Fatalf("expected %q but got %q", expected, out) - } -} - -func TestExitCode(t *testing.T) { - ran, err := Exec(nil, nil, nil, os.Args[0], "-helper", "-exit", "99") - if err == nil { - t.Fatal("unexpected nil error from run") - } - if !ran { - t.Errorf("ran returned as false, but should have been true") - } - code := ExitStatus(err) - if code != 99 { - t.Fatalf("expected exit status 99, but got %v", code) - } -} - -func TestEnv(t *testing.T) { - env := "SOME_REALLY_LONG_MAGEFILE_SPECIFIC_THING" - out := &bytes.Buffer{} - ran, err := Exec(map[string]string{env: "foobar"}, out, nil, os.Args[0], "-printVar", env) - if err != nil { - t.Fatalf("unexpected error from runner: %#v", err) - } - if !ran { - t.Errorf("expected ran to be true but was false.") - } - if out.String() != "foobar\n" { - t.Errorf("expected foobar, got %q", out) - } -} - -func TestNotRun(t *testing.T) { - ran, err := Exec(nil, nil, nil, "thiswontwork") - if err == nil { - t.Fatal("unexpected nil error") - } - if ran { - t.Fatal("expected ran to be false but was true") - } -} - -func TestAutoExpand(t *testing.T) { - if err := os.Setenv("MAGE_FOOBAR", "baz"); err != nil { - t.Fatal(err) - } - s, err := Output("echo", "$MAGE_FOOBAR") - if err != nil { - t.Fatal(err) - } - if s != "baz" { - t.Fatalf(`Expected "baz" but got %q`, s) - } - -} diff --git a/vendor/github.com/magefile/mage/sh/helpers.go b/vendor/github.com/magefile/mage/sh/helpers.go deleted file mode 100644 index 86b075e..0000000 --- a/vendor/github.com/magefile/mage/sh/helpers.go +++ /dev/null @@ -1,16 +0,0 @@ -package sh - -import ( - "fmt" - "os" -) - -// Rm removes the given file or directory even if non-empty. It will not return -// an error if the target doesn't exist, only if the target cannot be removed. -func Rm(path string) error { - err := os.RemoveAll(path) - if err == nil || os.IsNotExist(err) { - return nil - } - return fmt.Errorf(`failed to remove %s: %v`, path, err) -} diff --git a/vendor/github.com/magefile/mage/sh/testmain_test.go b/vendor/github.com/magefile/mage/sh/testmain_test.go deleted file mode 100644 index 5869c54..0000000 --- a/vendor/github.com/magefile/mage/sh/testmain_test.go +++ /dev/null @@ -1,46 +0,0 @@ -package sh - -import ( - "flag" - "fmt" - "os" - "testing" -) - -var ( - helperCmd bool - printArgs bool - stderr string - stdout string - exitCode int - printVar string -) - -func init() { - flag.BoolVar(&helperCmd, "helper", false, "") - flag.BoolVar(&printArgs, "printArgs", false, "") - flag.StringVar(&stderr, "stderr", "", "") - flag.StringVar(&stdout, "stdout", "", "") - flag.IntVar(&exitCode, "exit", 0, "") - flag.StringVar(&printVar, "printVar", "", "") -} - -func TestMain(m *testing.M) { - flag.Parse() - - if printArgs { - fmt.Println(flag.Args()) - return - } - if printVar != "" { - fmt.Println(os.Getenv(printVar)) - return - } - - if helperCmd { - fmt.Fprintln(os.Stderr, stderr) - fmt.Fprintln(os.Stdout, stdout) - os.Exit(exitCode) - } - os.Exit(m.Run()) -} diff --git a/vendor/github.com/magefile/mage/site/archetypes/default.md b/vendor/github.com/magefile/mage/site/archetypes/default.md deleted file mode 100644 index f5a9e45..0000000 --- a/vendor/github.com/magefile/mage/site/archetypes/default.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "{{ replace .TranslationBaseName "-" " " | title }}" -date: {{ .Date }} -draft: true ---- - diff --git a/vendor/github.com/magefile/mage/site/config.toml b/vendor/github.com/magefile/mage/site/config.toml deleted file mode 100644 index b63211f..0000000 --- a/vendor/github.com/magefile/mage/site/config.toml +++ /dev/null @@ -1,34 +0,0 @@ -baseURL = "https://magefile.org" -languageCode = "en-US" -defaultContentLanguage = "en" - -title = "Mage Documentation" -theme = "learn" -defaultContentLanguageInSubdir= true - -[params] - editURL = "https://github.com/magefile/mage/edit/master/site/content/" - description = "Mage" - author = "Nate Finch" - showVisitedLinks = true - -[outputs] -home = [ "HTML", "RSS", "JSON"] - -[Languages] -[Languages.en] -title = "Mage" -weight = 1 -languageName = "English" - -[[Languages.en.menu.shortcuts]] -name = " Github repo" -# identifier = "ds" -url = "https://github.com/magefile/mage" -weight = 10 - -[[Languages.en.menu.shortcuts]] -name = " Twitter Account" -# identifier = "ds" -url = "https://twitter.com/MagefileDotOrg" -weight = 20 \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/content/dependencies/_index.en.md b/vendor/github.com/magefile/mage/site/content/dependencies/_index.en.md deleted file mode 100644 index dc07d9e..0000000 --- a/vendor/github.com/magefile/mage/site/content/dependencies/_index.en.md +++ /dev/null @@ -1,74 +0,0 @@ -+++ -title = "Dependencies" -weight = 30 -+++ - -Mage supports a makefile-style tree of dependencies using the helper library -[github.com/magefile/mage/mg](https://godoc.org/github.com/magefile/mage/mg). To -declare dependencies, pass any number of dependent functions of the following -types: -``` -func() -func() error -func(ctx context.Context) -func(ctx context.Context) error -``` -(they may be targets, but do not need to be and do not have to be exported) to -`mg.Deps()`, and the Deps function will not return until all declared -dependencies have been run (and any dependencies they have are run). -Dependencies are guaranteed to run exactly once in a single execution of mage, -so if two of your dependencies both depend on the same function, it is still -guaranteed to be run only once, and both funcs that depend on it will not -continue until it has been run. - -## Parallelism - -If run with `mg.Deps` or `mg.CtxDeps`, dependencies are run in their own -goroutines, so they are parellelized as much as possible given the dependency -tree ordering restrictions. If run with `mg,SerialDeps` or `mg.SerialCtxDeps`, -the dependencies are run serially, though each dependency or sub-dependency will -still only ever be run once. - -## Contexts and Cancellation - -Dependencies that have a context.Context argument will be passed a context, -either a default context if passed into `mg.Deps` or `mg.SerialDeps`, or the one -passed into `mg.CtxDeps` or `mg.SerialCtxDeps`. The default context, which is -also passed into [targets](/targets) with a context argument, will be cancelled -when and if the timeout specified on the command line is hit. - -### Example Dependencies - -```go -func Build() { - mg.Deps(f, g) - fmt.Println("Build running") -} - -func f() { - mg.Deps(h) - fmt.Println("f running") -} - -func g() { - mg.Deps(h) - fmt.Println("g running") -} - -func h() { - fmt.Println("h running") -} -``` - -Running `mage build` will produce the following output: - -``` -h running -g running -f running -Build running -``` - -Note that since f and g do not depend on each other, and they're running in -their own goroutines, their order is non-deterministic, other than they are -guaranteed to run after h has finished, and before Build continues. diff --git a/vendor/github.com/magefile/mage/site/content/filesources/_index.en.md b/vendor/github.com/magefile/mage/site/content/filesources/_index.en.md deleted file mode 100644 index c2f2bd3..0000000 --- a/vendor/github.com/magefile/mage/site/content/filesources/_index.en.md +++ /dev/null @@ -1,18 +0,0 @@ -+++ -title = "File Sources and Destinations" -weight = 35 -+++ - -Mage supports make-like comparisons of file sources and file targets. Using the -[target](https://godoc.org/github.com/magefile/mage/target) library, you can -easily compare the last modified times of a target file or directory with the -last modified time of the file or directories required to build that target. - -`target.Path` compares the last modified time of a target file or directory with -the last modified time of one or more files or directories. If any of the -sources are newer than the destination, the function will return true. Note -that Path does not recurse into directories. If you give it a directory, the -only last modified time it'll check is that of the directory itself. - -`target.Dir` is like `target.Path` except that it recursively checks files and -directories under any directories specified, comparing timestamps. \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/content/howitworks/_index.en.md b/vendor/github.com/magefile/mage/site/content/howitworks/_index.en.md deleted file mode 100644 index beae53a..0000000 --- a/vendor/github.com/magefile/mage/site/content/howitworks/_index.en.md +++ /dev/null @@ -1,23 +0,0 @@ -+++ -title="How It Works" -weight = 50 -+++ - -Mage scans the current directory for go files with the `mage` build tag (i.e. -`// +build mage`), using the normal go build rules for following build -constraints (aside from requiring the mage tag). It then parses those files to -find the build targets, generates a main file for the command, and compiles a -binary from those files. The magefiles are hashed so that if they remain -unchanged, the same compiled binary will be reused next time, to avoid the -generation overhead. - -## Binary Cache - -Compiled magefile binaries are stored in $HOME/.magefile. This location can be -customized by setting the MAGEFILE_CACHE environment variable. - -## Go Environment - -Mage itself requires no dependencies to run. However, because it is compiling -go code, you must have a valid go environment set up on your machine. Mage is -compatibile with any go 1.x environment. \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/content/index.md b/vendor/github.com/magefile/mage/site/content/index.md deleted file mode 100644 index 6d811e8..0000000 --- a/vendor/github.com/magefile/mage/site/content/index.md +++ /dev/null @@ -1,72 +0,0 @@ -+++ -title = "Mage" -+++ - -

- -

Mage is a make/rake-like build tool using Go.

- -## Installation - -Mage has no dependencies outside the Go standard library, and builds with Go 1.7 -and above (possibly even lower versions, but they're not regularly tested). To -install, just use `go get`: - -`go get github.com/magefile/mage` - -## Demo - -{{< youtube GOqbD0lF-iA >}} - -## Discussion - -Join the `#mage` channel on [gophers slack](https://gophers.slack.com/messages/general/) for discussion of usage, development, etc. - - -## Plugins - -There are no plugins. You don't need plugins. It's just Go code. You can -import whatever libraries you want. Every library in the go ecosystem is a mage -plugin. Every tool you use with Go can be used with Magefiles. - -## Usage -``` -mage [options] [target] -Options: - -f force recreation of compiled magefile - -h show this help - -init - create a starting template if no mage files exist - -keep - keep intermediate mage files around after running - -l list mage targets in this directory - -t string - timeout in duration parsable format (e.g. 5m30s) - -v show verbose output when running mage targets - -version - show version info for the mage binary -``` - -## Environment Variables - -You may set MAGE_VERBOSE=1 to always enable verbose logging in your magefiles, -without having to remember to pass -v every time. - -## Why? - -Makefiles are hard to read and hard to write. Mostly because makefiles are essentially fancy bash scripts with significant white space and additional make-related syntax. - -Mage lets you have multiple magefiles, name your magefiles whatever you -want, and they're easy to customize for multiple operating systems. Mage has no -dependencies (aside from go) and runs just fine on all major operating systems, whereas make generally uses bash which is not well supported on Windows. -Go is superior to bash for any non-trivial task involving branching, looping, anything that's not just straight line execution of commands. And if your project is written in Go, why introduce another -language as idiosyncratic as bash? Why not use the language your contributors -are already comfortable with? - -## Code - -[https://github.com/magefile/mage](https://github.com/magefile/mage) - -## Projects that build with Mage - -[![Hugo](/images/hugo.png)](https://github.com/gohugoio/hugo) [![Gnorm](/images/gnorm.png)](https://github.com/gnormal/gnorm) diff --git a/vendor/github.com/magefile/mage/site/content/libraries/_index.en.md b/vendor/github.com/magefile/mage/site/content/libraries/_index.en.md deleted file mode 100644 index 927859e..0000000 --- a/vendor/github.com/magefile/mage/site/content/libraries/_index.en.md +++ /dev/null @@ -1,20 +0,0 @@ -+++ -title = "Helper Libraries" -weight = 45 -+++ - -There are three helper libraries bundled with mage, -[mg](https://godoc.org/github.com/magefile/mage/mg), -[sh](https://godoc.org/github.com/magefile/mage/sh), and -[target](https://godoc.org/github.com/magefile/mage/target) - -Package `mg` contains mage-specific helpers, such as Deps for declaring -dependent functions, and functions for returning errors with specific error -codes that mage understands. - -Package `sh` contains helpers for running shell-like commands with an API that's -easier on the eyes and more helpful than os/exec, including things like -understanding how to expand environment variables in command args. - -Package `target` contains helpers for performing make-like timestamp cmoparing -of files. It makes it easy to bail early if this target doesn't need to be run. \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/content/magefiles/_index.en.md b/vendor/github.com/magefile/mage/site/content/magefiles/_index.en.md deleted file mode 100644 index 1aa8f03..0000000 --- a/vendor/github.com/magefile/mage/site/content/magefiles/_index.en.md +++ /dev/null @@ -1,85 +0,0 @@ -+++ -title = "Magefiles" -weight = 20 -+++ - - -A mage file is any regular go file marked with a build target of "mage" and in -package main. - -```go -// +build mage - -package main -``` - -You can quickly create a template mage file with the `-init` option. - -`mage -init` - -You may have any number of magefiles in the same directory. Mage doesn't care -what they're named aside from normal go filename rules. All they need is to -have the mage build target. Handily, this also excludes them from your regular -builds, so they can live side by side with your normal go files. Magefiles may -use any of Go's usual build constraints, so you can include and exclude -magefiles based on OS, arch, etc, whether in the filename or in the +build line. - -```go -// +build mage - -package main - -import ( - "log" - "os" -) - - -// Build target is any exported function with zero args with no return or an error return. -// If a target has an error return and returns an non-nil error, mage will print -// that error to stdout and return with an exit code of 1. -func Install() error { - -} - -// The first sentence in the comment will be the short help text shown with mage -l. -// The rest of the comment is long help text that will be shown with mage -h -func Target() { - // by default, the log stdlib package will be set to discard output. - // Running with mage -v will set the output to stdout. - log.Printf("Hi!") -} - -// A var named Default indicates which target is the default. -var Default = Install - - -// Because build targets are case insensitive, you may not have two build targets -// that lowercase to the same text. This would give you an error when you tried -// to run the magefile: -// func BUILD() {} - -// Targets may have a context argument, in which case a default context is passed -// to the target, which will be cancelled after a timeout if the -t flag is used. -func Build(ctx context.Context) error { - mg.CtxDeps(ctx, Target) -} - -``` - -``` -$ mage -l -Targets: - install* Build target is any exported function with zero args with no return or an error return. - target The first sentence in the comment will be the short help text shown with mage -l. - -* default target -``` - -``` -$ mage -h target -mage target: - -The first sentence in the comment will be the short help text shown with mage -l. -The rest of the comment is long help text that will be shown with mage -h -``` diff --git a/vendor/github.com/magefile/mage/site/content/targets/_index.en.md b/vendor/github.com/magefile/mage/site/content/targets/_index.en.md deleted file mode 100644 index 80c339c..0000000 --- a/vendor/github.com/magefile/mage/site/content/targets/_index.en.md +++ /dev/null @@ -1,42 +0,0 @@ -+++ -title = "Targets" -weight = 10 -+++ -A target is any exported function that is one of the following types: -``` -func() -func() error -func(context.Context) -func(context.Context) error -``` -A target is effectively a subcommand of mage while running mage in -this directory. i.e. you can run a target by running `mage ` - -If the function has an error return, errors returned from the function will -print to stdout and cause the magefile to exit with an exit code of 1. Any -functions that do not fit this pattern are not considered targets by mage. - -Comments on the target function will become documentation accessible by running -`mage -l` which will list all the build targets in this directory with the first -sentence from their docs, or `mage -h ` which will show the full comment -from the docs on the function. - -A target may be designated the default target, which is run when the user runs -`mage` with no target specified. To denote the default, create a `var Default = -` If no default target is specified, running `mage` with no target -will print the list of targets, like `mage -l`. - -## Multiple Targets - -Multiple targets can be specified as args to Mage, for example `mage foo bar -baz`. Targets will be run serially, from left to right (so in thise case, foo, -then once foo is done, bar, then once bar is done, baz). Dependencies run using -mg.Deps will still only run once per mage execution, so if each of the targets -depend on the same function, that function will only be run once for all -targets. If any target panics or returns an error, no later targets will be run. - -## Contexts and Cancellation - -A default context is passed into any target with a context argument. This -context will have a timeout if mage was run with -t, and thus will cancel -the running targets and dependencies at that time. \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/content/zeroInstall/_index.en.md b/vendor/github.com/magefile/mage/site/content/zeroInstall/_index.en.md deleted file mode 100644 index c88482b..0000000 --- a/vendor/github.com/magefile/mage/site/content/zeroInstall/_index.en.md +++ /dev/null @@ -1,42 +0,0 @@ -+++ -title = "Zero Install Option" -weight = 40 -+++ - - -Don't want to depend on another binary in your environment? You can run mage -directly out of your vendor directory (or GOPATH) with `go run`. - -Just save a file like this (I'll call it `mage.go`, but it can be named -anything. Note that the build tag is *not* `+build mage`. Mage will create its own main file, so we need this one to be excluded from when your magefiles are compiled. - -Now you can `go run mage.go ` and it'll work just as if you ran `mage -` - -```go -// +build ignore - -package main - -import ( - "os" - "github.com/magefile/mage/mage" -) - -func main() { os.Exit(mage.Main()) } -``` - -Note that because of the peculiarities of `go run`, if you run this way, go run -will only ever exit with an error code of 0 or 1. If mage exits with error code -99, for example, `go run` will print out `exit status 99" and then exit with -error code 1. Why? Ask the go team. I've tried to get them to fix it, and -they won't. - - -## Use Mage as a library - -All of mage's functionality is accessible as a compile-in library. Checkout -[godoc.org/github.com/magefile/mage/mage](https://godoc.org/github.com/mage/mage) -for full details. - -Fair warning, the API of mage/mage may change, so be sure to use vendoring. \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/layouts/partials/favicon.html b/vendor/github.com/magefile/mage/site/layouts/partials/favicon.html deleted file mode 100644 index 32df640..0000000 --- a/vendor/github.com/magefile/mage/site/layouts/partials/favicon.html +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/layouts/partials/logo.html b/vendor/github.com/magefile/mage/site/layouts/partials/logo.html deleted file mode 100644 index b227279..0000000 --- a/vendor/github.com/magefile/mage/site/layouts/partials/logo.html +++ /dev/null @@ -1,2 +0,0 @@ -

Mage

- \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/static/images/favicon.ico b/vendor/github.com/magefile/mage/site/static/images/favicon.ico deleted file mode 100644 index 45ef85e..0000000 Binary files a/vendor/github.com/magefile/mage/site/static/images/favicon.ico and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/static/images/favicon.png b/vendor/github.com/magefile/mage/site/static/images/favicon.png deleted file mode 100644 index 2e1e9fe..0000000 Binary files a/vendor/github.com/magefile/mage/site/static/images/favicon.png and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/static/images/gary.svg b/vendor/github.com/magefile/mage/site/static/images/gary.svg deleted file mode 100644 index 933ef0d..0000000 --- a/vendor/github.com/magefile/mage/site/static/images/gary.svg +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/github.com/magefile/mage/site/static/images/gnorm.png b/vendor/github.com/magefile/mage/site/static/images/gnorm.png deleted file mode 100644 index 546b119..0000000 Binary files a/vendor/github.com/magefile/mage/site/static/images/gnorm.png and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/static/images/hugo.png b/vendor/github.com/magefile/mage/site/static/images/hugo.png deleted file mode 100644 index da6785b..0000000 Binary files a/vendor/github.com/magefile/mage/site/static/images/hugo.png and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/.gitignore b/vendor/github.com/magefile/mage/site/themes/learn/.gitignore deleted file mode 100644 index 6429751..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.DS_Store -public/ -exampleSite/public diff --git a/vendor/github.com/magefile/mage/site/themes/learn/LICENSE.md b/vendor/github.com/magefile/mage/site/themes/learn/LICENSE.md deleted file mode 100644 index bab5bbb..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Grav -Copyright (c) 2016 MATHIEU CORNIC - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/magefile/mage/site/themes/learn/README.md b/vendor/github.com/magefile/mage/site/themes/learn/README.md deleted file mode 100644 index 5c5606a..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# Hugo Learn Theme - -This repository contains a theme for [Hugo](https://gohugo.io/), based on great [Grav Learn Theme](http://learn.getgrav.org/). - -Visit the [theme documentation](https://learn.netlify.com/en/) to see what is going on. It is actually built with this theme. - -## Main features - -- Automatic Search -- Multilingual mode -- Unlimited menu levels -- Automatic next/prev buttons to navigate through menu entries -- Image resizing, shadow… -- Attachments files -- List child pages -- Mermaid diagram (flowchart, sequence, gantt) -- Customizable look and feel and themes variants -- Buttons, Tip/Note/Info/Warning boxes, Expand - -## Installation - -Navigate to your themes folder in your Hugo site and use the following commands: - -``` -$ cd themes -$ git clone https://github.com/matcornic/hugo-theme-learn.git -``` - -Check that your Hugo version is minimum `0.25` with `hugo version`. - -![Overview](https://github.com/matcornic/hugo-theme-learn/raw/master/images/tn.png) - -## Usage - -- [Visit the documentation](https://learn.netlify.com/en/) - -## Download old versions (prior to 2.0.0) - -If you need old version for compatibility purpose, either download [theme source code from releases](https://github.com/matcornic/hugo-theme-learn/releases) or use the right git tag. For example, with `1.1.0` - -- Direct download way: https://github.com/matcornic/hugo-theme-learn/archive/1.1.0.zip -- Git way: - -```shell -cd themes/hugo-theme-learn -git checkout tags/1.1.0 -``` - -For both solutions, the documentation is available at https://github.com/matcornic/hugo-theme-learn/releases/download/1.1.0/hugo-learn-doc-1.1.0.zip diff --git a/vendor/github.com/magefile/mage/site/themes/learn/archetypes/chapter.md b/vendor/github.com/magefile/mage/site/themes/learn/archetypes/chapter.md deleted file mode 100644 index 240b652..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/archetypes/chapter.md +++ /dev/null @@ -1,13 +0,0 @@ -+++ -title = "{{ replace .TranslationBaseName "-" " " | title }}" -date = {{ .Date }} -weight = 5 -chapter = true -pre = "X. " -+++ - -### Chapter X - -# Some Chapter title - -Lorem Ipsum. \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/archetypes/default.md b/vendor/github.com/magefile/mage/site/themes/learn/archetypes/default.md deleted file mode 100644 index c89c2e4..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/archetypes/default.md +++ /dev/null @@ -1,7 +0,0 @@ -+++ -title = "{{ replace .TranslationBaseName "-" " " | title }}" -date = {{ .Date }} -weight = 5 -+++ - -Lorem Ipsum. \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/LICENSE.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/LICENSE.md deleted file mode 100644 index 973626d..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 MATHIEU CORNIC - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/README.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/README.md deleted file mode 100644 index c861e75..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/README.md +++ /dev/null @@ -1,39 +0,0 @@ -- récriture doc -> TODO - - créer une section Showcase -- Menus déroulants icone -> TODO - -- créer des jolis thèmes de base (avec des noms ou au moins de meilleures couleurs) -> DOING - - Thème blue : OK - - Thème red: OK - - Theme green: OK -- Passer a Wercker -> OK -- corriger le multilangue pour la recherche et les autres ressources statiques : OK -- Section "MORE" -> OK -- ajouter les childs -> OK -- ajouter les attachments -> OK -- refaire la possibilité d'overrider le style/script/etc -> OK -- sticky bar -> OK -- ajouter Travis pour tester le thème quotidiennement avec les nouvelles versions de Hugo -> OK -- #54 -> OK -- corriger slider menu qui ne fonctionne plus -> OK -- Update font awesome -> OK -- internationalisation -> OK - - Messages: OK - - Ajouter un bouton pour changer de langue : OK -- netlify -> OK -- home page -> OK -- réintégrer la doc dans le même repo -> OK -- récupérer les shortcodes utiles -> OK - - expand : OK - - mermaid : OK -- chapter -> OK -- recherche (avec pointage à la première occurence sur la page) -> OK -- visited links -> OK -- disable Search -> OK -- vérifier que ça fonctionne avec une base url -> OK -- tester les affichages de page enfant -> OK -- comprendre l'histoire de pagination -> OK -- améliorer les couleurs de surlignement de highlightjs -> OK -- créer les archetypes -> OK - -> créé ceux de base -> OK - -> vérifier la possibilité de générer automatiquement le bon weight -> OK \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/config.toml b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/config.toml deleted file mode 100644 index 51f6b73..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/config.toml +++ /dev/null @@ -1,73 +0,0 @@ -baseURL = "/" -languageCode = "en-US" -defaultContentLanguage = "en" - -title = "Hugo Learn Documentation" -theme = "hugo-theme-learn" -themesdir = "../.." -metaDataFormat = "yaml" -defaultContentLanguageInSubdir= true - -[params] - editURL = "https://github.com/matcornic/hugo-theme-learn/edit/master/exampleSite/content/" - description = "Documentation for Hugo Learn Theme" - author = "Mathieu Cornic" - showVisitedLinks = true - -[outputs] -home = [ "HTML", "RSS", "JSON"] - -[Languages] -[Languages.en] -title = "Documentation for Hugo Learn Theme" -weight = 1 -languageName = "English" - -[[Languages.en.menu.shortcuts]] -name = " Github repo" -identifier = "ds" -url = "https://github.com/matcornic/hugo-theme-learn" -weight = 10 - -[[Languages.en.menu.shortcuts]] -name = " Showcases" -url = "showcase" -weight = 11 - -[[Languages.en.menu.shortcuts]] -name = " Hugo Documentation" -identifier = "hugodoc" -url = "https://gohugo.io/" -weight = 20 - -[[Languages.en.menu.shortcuts]] -name = " Credits" -url = "/credits" -weight = 30 - -[Languages.fr] -title = "Documentation du thème Hugo Learn" -weight = 2 -languageName = "Français" - -[[Languages.fr.menu.shortcuts]] -name = " Repo Github" -identifier = "ds" -url = "https://github.com/matcornic/hugo-theme-learn" -weight = 10 - -[[Languages.fr.menu.shortcuts]] -name = " Vitrine" -url = "/showcase" -weight = 11 - -[[Languages.fr.menu.shortcuts]] -name = " Documentation Hugo" -identifier = "hugodoc" -url = "https://gohugo.io/" -weight = 20 - -[[Languages.fr.menu.shortcuts]] -name = " Crédits" -url = "/credits" -weight = 30 \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/_index.en.md deleted file mode 100644 index 822792e..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/_index.en.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: "Learn Theme for Hugo" ---- - -# Hugo learn theme - -[Hugo-theme-learn](http://github.com/matcornic/hugo-theme-learn) is a theme for [Hugo](https://gohugo.io/), a fast and modern static website engine written in Go. Where Hugo is often used for blogs, this multilingual-ready theme is **fully designed for documentation**. - -This theme is a partial porting of the [Learn theme](http://learn.getgrav.org/) of [Grav](https://getgrav.org/), a modern flat-file CMS written in PHP. - -{{% notice tip %}}Learn theme works with a _page tree structure_ to organize content : All contents are pages, which belong to other pages. [read more about this]({{%relref "cont/pages/_index.md"%}}) -{{% /notice %}} - -## Main features - -* [Automatic Search]({{%relref "basics/configuration/_index.md" %}}) -* [Multilingual mode]({{%relref "cont/i18n/_index.md" %}}) -* **Unlimited menu levels** -* **Automatic next/prev buttons to navigate through menu entries** -* [Image resizing, shadow...]({{%relref "cont/markdown.en.md#images" %}}) -* [Attachments files]({{%relref "shortcodes/attachments.en.md" %}}) -* [List child pages]({{%relref "shortcodes/children/_index.md" %}}) -* [Mermaid diagram]({{%relref "shortcodes/mermaid.en.md" %}}) (flowchart, sequence, gantt) -* [Customizable look and feel and themes variants]({{%relref "basics/configuration/_index.md"%}}) -* [Buttons]({{%relref "shortcodes/button.en.md" %}}), [Tip/Note/Info/Warning boxes]({{%relref "shortcodes/notice.en.md" %}}), [Expand]({{%relref "shortcodes/expand.en.md" %}}) - -![Screenshot](https://github.com/matcornic/hugo-theme-learn/raw/master/images/screenshot.png?width=40pc&classes=shadow) - -## Contribute to this documentation -Feel free to update this content, just click the **Edit this page** link displayed on top right of each page, and pullrequest it - -{{% notice info %}} -Your modification will be deployed automatically when merged. -{{% /notice %}} - -## Documentation website -This current documentation has been statically generated with Hugo with a simple command : `hugo -t hugo-theme-learn` -- source code is [available here at GitHub](https://github.com/matcornic/hugo-theme-learn) - -{{% notice note %}} -Automatically published and hosted thanks to [Netlify](https://www.netlify.com/). Read more about [Automated HUGO deployments with Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/) -{{% /notice %}} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/_index.fr.md deleted file mode 100644 index 5e642eb..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/_index.fr.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: "Learn Theme for Hugo" ---- - -# Thème Hugo learn - -[Hugo-theme-learn](http://github.com/matcornic/hugo-theme-learn) est un thème pour [Hugo](https://gohugo.io/), un générateur de site statique, rapide et modern, écrit en Go. Tandis que Hugo est souvent utilisé pour des blogs, ce thème multi-langue est **entièrement conçu pour la documentation**. - -Ce thème est un portage partiel du [thème Learn](http://learn.getgrav.org/) de [Grav](https://getgrav.org/), un CMS modern écrit en PHP. - -{{% notice tip %}}Le thème Learn fonctionne grâce à la structure de page aborescentes pour organiser le contenu: tous les contenus sont des pages qui appartiennent à d'autres pages. [Plus d'infos]({{%relref "cont/pages/_index.md"%}}) -{{% /notice %}} - -## Fonctionnalité principales - -* [Recherche automatique]({{%relref "basics/configuration/_index.md" %}}) -* [Mode multi-langue]({{%relref "cont/i18n/_index.md" %}}) -* **Nombre de niveau infini dans le menu** -* **Boutons suivant/précédent automatiquement générés pour naviguer entre les items du menu** -* [Taille d'image, ombres...]({{%relref "cont/markdown.fr.md#images" %}}) -* [Fichiers joints]({{%relref "shortcodes/attachments.fr.md" %}}) -* [Lister les pages filles]({{%relref "shortcodes/children/_index.md" %}}) -* [Diagrammes Mermaid]({{%relref "shortcodes/mermaid.fr.md" %}}) (flowchart, sequence, gantt) -* [Style configurable and variantes de couleurs]({{%relref "basics/configuration/_index.md"%}}) -* [Boutons]({{%relref "shortcodes/button.fr.md" %}}), [Messages Astuce/Note/Info/Attention]({{%relref "shortcodes/notice.fr.md" %}}), [Expand]({{%relref "shortcodes/expand.fr.md" %}}) - -![Screenshot](https://github.com/matcornic/hugo-theme-learn/raw/master/images/screenshot.png?width=40pc&classes=shadow) - -## Contribuer à cette documentation - -N'hésitez pas à mettre à jour ce contenu en cliquant sur le lien **Modifier cette page** en haut de chaque page, et créer la Pull Request associée. - -{{% notice info %}} -Votre modification sera déployée automatiquement quand elle sera mergée. -{{% /notice %}} - -## Site de documentation - -Cette documentation statique a été générée avec Hugo avec une simple commande : `hugo -t hugo-theme-learn` -- le code source est [disponible sur Github](https://github.com/matcornic/hugo-theme-learn) - -{{% notice note %}} -Le site est auomatiquement publié et hébergé par [Netlify](https://www.netlify.com/). Plus d'infos sur le [déploiement de site Hugo avec Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)(En anglais) -{{% /notice %}} diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/_index.en.md deleted file mode 100755 index 56e2968..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/_index.en.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Basics -weight: 5 -pre: "1. " -chapter: true ---- - -### Chapter 1 - -# Basics - -Discover what this Hugo theme is all about and the core-concepts behind it. diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/_index.fr.md deleted file mode 100644 index 386bf19..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/_index.fr.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Démarrage -weight: 5 -pre: "1. " -chapter: true ---- - -### Chapitre 1 - -# Démarrage - -Découvrez comment utiliser ce thème Hugo et apprenez en les concepts diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/_index.en.md deleted file mode 100644 index d4ed0e7..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/_index.en.md +++ /dev/null @@ -1,246 +0,0 @@ ---- -date: 2016-04-09T16:50:16+02:00 -title: Configuration -weight: 20 ---- - -## Global site parameters - -On top of [Hugo global configuration](https://gohugo.io/overview/configuration/), **Hugo-theme-learn** lets you define the following parameters in your `config.toml` (here, values are default). - -Note that some of these parameters are explained in details in other sections of this documentation. - -```toml -[params] - # Prefix URL to edit current page. Will display an "Edit this page" button on top right hand corner of every page. - # Useful to give opportunity to people to create merge request for your doc. - # See the config.toml file from this documentation site to have an example. - editURL = "" - # Author of the site, will be used in meta information - author = "" - # Description of the site, will be used in meta information - description = "" - # Shows a checkmark for visited pages on the menu - showVisitedLinks = false - # Disable search function. It will hide search bar - disableSearch = false - # Javascript and CSS cache are automatically busted when new version of site is generated. - # Set this to true to disable this behavior (some proxies don't handle well this optimization) - disableAssetsBusting = false - # Set this to true to disable copy-to-clipboard button for inline code. - disableInlineCopyToClipBoard = false - # A title for shortcuts in menu is set by default. Set this to true to disable it. - disableShortcutsTitle = false - # When using mulitlingual website, disable the switch language button. - disableLanguageSwitchingButton = false - # Order sections in menu by "weight" or "title". Default to "weight" - ordersectionsby = "weight" - # Change default color scheme with a variant one. Can be "red", "blue", "green". - themeVariant = "" -``` - -## Activate search - -If not already present, add the follow lines in the same `config.toml` file. - -```toml -[outputs] -home = [ "HTML", "RSS", "JSON"] -``` - -Learn theme uses the last improvement available in hugo version 20+ to generate a json index file ready to be consumed by lunr.js javascript search engine. - -> Hugo generate lunrjs index.json at the root of public folder. -> When you build the site with hugo server, hugo generates it internally and of course it don’t show up in the filesystem - - -## Style customization - -**Hugo-theme-learn** has been built to be as configurable as possible by defining multiple [partials](https://gohugo.io/templates/partials/) - -In `themes/hugo-theme-learn/layouts/partials/`, you will find all the partials defined for this theme. If you need to overwrite something, don't change the code directly. Instead [follow this page](https://gohugo.io/themes/customizing/). You'd create a new partial in the `layouts/partials` folder of your local project. This partial will have the priority. - -This theme defines the following partials : - -- *header*: the header of the content page (contains the breadcrumbs). _Not meant to be overwritten_ -- *custom-header*: custom headers in page. Meant to be overwritten when adding CSS imports. Don't forget to include `style` HTML tag directive in your file -- *footer*: the footer of the content page (contains the arrows). _Not meant to be overwritten_ -- *custom-footer*: custom footer in page. Meant to be overwritten when adding Javacript. Don't forget to include `javascript` HTML tag directive in your file -- *favicon*: the favicon -- *logo*: the logo, on top left hand corner. -- *meta*: HTML meta tags, if you want to change default behavior -- *menu*: left menu. _Not meant to be overwritten_ -- *menu-footer*: footer of the the left menu -- *search*: search box -- *toc*: table of contents - -### Change the logo - -Create a new file in `layouts/partials/` named `logo.html`. Then write any HTML you want. -You could use an `img` HTML tag and reference an image created under the *static* folder, or you could paste a SVG definition ! - -{{% notice note %}} -The size of the logo will adapt automatically -{{% /notice %}} - -### Change the favicon - -If your favicon is a png, just drop off your image in your local `static/images/` folder and names it `favicon.png` - -If you need to change this default behavior, create a new file in `layouts/partials/` named `favicon.html`. Then write something like this: - -```html - -``` - -### Change default colors {#theme-variant} - -**Hugo Learn theme** let you choose between 3 native color scheme variants, but feel free to add one yourself ! Default color scheme is based on [Grav Learn Theme](https://learn.getgrav.org/). - -#### Red variant - -```toml -[params] - # Change default color scheme with a variant one. Can be "red", "blue", "green". - themeVariant = "red" -``` - -![Red variant](/basics/configuration/images/red-variant.png?width=60%) - -#### Blue variant - -```toml -[params] - # Change default color scheme with a variant one. Can be "red", "blue", "green". - themeVariant = "blue" -``` - -![Blue variant](/basics/configuration/images/blue-variant.png?width=60%) - -#### Green variant - -```toml -[params] - # Change default color scheme with a variant one. Can be "red", "blue", "green". - themeVariant = "green" -``` - -![Green variant](/basics/configuration/images/green-variant.png?width=60%) - -#### 'Yours‘ variant - -First, create a new CSS file in your local `static/css` folder prefixed by `theme` (e.g. with _mine_ theme `static/css/theme-mine.css`). Copy the following content and modify colors in CSS variables. - -```css - -:root{ - - --MAIN-TEXT-color:#323232; /* Color of text by default */ - --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ - --MAIN-LINK-color:#1C90F3; /* Color of links */ - --MAIN-LINK-HOVER-color:#167ad0; /* Color of hovered links */ - --MAIN-ANCHOR-color: #1C90F3; /* color of anchors on titles */ - - --MENU-HEADER-BG-color:#1C90F3; /* Background color of menu header */ - --MENU-HEADER-BORDER-color:#33a1ff; /*Color of menu header border */ - - --MENU-SEARCH-BG-color:#167ad0; /* Search field background color (by default borders + icons) */ - --MENU-SEARCH-BOX-color: #33a1ff; /* Override search field border color */ - --MENU-SEARCH-BOX-ICONS-color: #a1d2fd; /* Override search field icons color */ - - --MENU-SECTIONS-ACTIVE-BG-color:#20272b; /* Background color of the active section and its childs */ - --MENU-SECTIONS-BG-color:#252c31; /* Background color of other sections */ - --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ - --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ - --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ - --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ - - --MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */ - --MENU-SECTION-HR-color: #20272b; /* Color of
separator in menu */ - -} - -body { - color: var(--MAIN-TEXT-color) !important; -} - -textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { - border-color: none; - box-shadow: none; -} - -h2, h3, h4, h5 { - color: var(--MAIN-TITLES-TEXT-color) !important; -} - -a { - color: var(--MAIN-LINK-color); -} - -.anchor { - color: var(--MAIN-ANCHOR-color); -} - -a:hover { - color: var(--MAIN-LINK-HOVER-color); -} - -#sidebar ul li.visited > a .read-icon { - color: var(--MENU-VISITED-color); -} - -#body a.highlight:after { - display: block; - content: ""; - height: 1px; - width: 0%; - -webkit-transition: width 0.5s ease; - -moz-transition: width 0.5s ease; - -ms-transition: width 0.5s ease; - transition: width 0.5s ease; - background-color: var(--MAIN-HOVER-color); -} -#sidebar { - background-color: var(--MENU-SECTIONS-BG-color); -} -#sidebar #header-wrapper { - background: var(--MENU-HEADER-BG-color); - color: var(--MENU-SEARCH-BOX-color); - border-color: var(--MENU-HEADER-BORDER-color); -} -#sidebar .searchbox { - border-color: var(--MENU-SEARCH-BOX-color); - background: var(--MENU-SEARCH-BG-color); -} -#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { - background: var(--MENU-SECTIONS-ACTIVE-BG-color); -} -#sidebar .searchbox * { - color: var(--MENU-SEARCH-BOX-ICONS-color); -} - -#sidebar a { - color: var(--MENU-SECTIONS-LINK-color); -} - -#sidebar a:hover { - color: var(--MENU-SECTIONS-LINK-HOVER-color); -} - -#sidebar ul li.active > a { - background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); - color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; -} - -#sidebar hr { - border-color: var(--MENU-SECTION-HR-color); -} -``` - -Then, set the `themeVariant` value with the name of your custom theme file. That's it ! - -```toml -[params] - # Change default color scheme with a variant one. Can be "red", "blue", "green". - themeVariant = "mine" -``` \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/_index.fr.md deleted file mode 100644 index ab7f4fc..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/_index.fr.md +++ /dev/null @@ -1,245 +0,0 @@ ---- -date: 2016-04-09T16:50:16+02:00 -title: Configuration -weight: 20 ---- - -## Global site parameters - -En plus de la [configuration globale d'Hugo](https://gohugo.io/overview/configuration/), **Hugo-theme-learn** vous permet de définir les paramètres suivant dans votre fichier `config.toml` (ci-dessous sont affichées les valeurs par défaut). - -Notez que certains de ces paramètres sont expliqués en détails dans d'autres sections de cette documentation. - -```toml -[params] - # L'URL préfixe pour éditer la page courante. Ce paramètre affichera un bouton "Modifier cette page" on haut de de chacune des pages. - # Pratique pour donner les possibilité à vos utilisateurs de créer une merge request pour votre doc. - # Allez voir le fichier config.toml de cette documentation pour avoir un exemple. - editURL = "" - # Autheur du site, est utilisé dans les informations meta - author = "" - # Description du site, est utilisé dans les informations meta - description = "" - # Affiche une icône lorsque la page a été visitée - showVisitedLinks = false - # Désactive la fonction de recherche. Une valeur à true cache la barre de recherche. - disableSearch = false - # Par défaut, le cache Javascript et CSS est automatiquement vidé lorsqu'une nouvelle version du site est générée. - # Utilisez ce paramètre lorsque vous voulez désactiver ce comportement (c'est parfois incompatible avec certains proxys) - disableAssetsBusting = false - # Utilisez ce paramètre pour désactiver le bouton copy-to-clipboard pour le code formatté sur une ligne. - disableInlineCopyToClipBoard = false - # Un titre est défini par défaut lorsque vous utilisez un raccourci dans le menu. Utilisez ce paramètre pour le cacher. - disableShortcutsTitle = false - # Quand vous utilisez un site multi-langue, utilisez ce paramètre pour désactiver le bouton de changement de langue. - disableLanguageSwitchingButton = false - # Ordonne les sections dans menu par poids ("weight") ou titre ("title"). Défaut à "weight" - ordersectionsby = "weight" - # Utilisez ce paramètre pour modifier le schéma de couleur du site. Les valeurs par défaut sont "red", "blue", "green". - themeVariant = "" -``` - -## Activez la recherche - -Si ce n'est pas déjà présent, ajoutez les lignes suivantes dans le fichier `config.toml`. - -```toml -[outputs] -home = [ "HTML", "RSS", "JSON"] -``` - -Le thème *Learn* utilise les dernières amélioraions d'Hugo pour générer un fichier d'index JSON, prêt à être consommé par le moteur de recherche lunr.js. - -> Hugo génère lunrjs index.json à la racine du dossier `public`. -> Quand vous générez le site avec `hugo server`, Hugo génère le fichier en mémoire, il n'est donc pas disponible sur le disque. - -## Personnaliser le style - -**Hugo-theme-learn** a été conçu pour être aussi configurable que possible en définissant plusieurs [partials](https://gohugo.io/templates/partials/) - -Dans `themes/hugo-theme-learn/layouts/partials/`, vous pourrez trouver tous les *partials* définis pour ce thème. Si vous avez besoin d'écraser quelque chose, ne modifiez pas le code directement. A la place, [suivez cette page](https://gohugo.io/themes/customizing/). Vous créerez alors un nouveau *partial* dans le dossier `layouts/partials` de votre site local. Ce *partial* aura la priorité. - -Ce thème définit les *partials* suivant : - -- *header*: l'en-tête de la page page (contient le fil d'Ariane). _Pas voué à être écrasé_ -- *custom-header*: En-tête personnalisé. Voué à être écrasé quand vous ajoutez des imports CSS. N'oubliez pas d'inclure la balise HTML `style` dans votre fichier -- *footer*: le pied-de-page de la page (contains les flèches). _Pas voué à être écrasé_ -- *custom-footer*: Pied-de-page personnalisé. Voué à être écrasé quand vous ajoutez du Javascript. N'oubliez pas d'inclure la balise HTML `javascript` dans votre fichier -- *favicon*: le favicon -- *logo*: le logo, affiché un haut à gauche. -- *meta*: les balises HTML meta, que vous pouvez écraser sans problème. -- *menu*: Le menu à gauche. _Pas voué à être écrasé_ -- *menu-footer*: Le pied-de-page du menu -- *search*: le champ de recherche -- *toc*: le sommaire - -### Changer le logo - -Créez un nouveau fichier dans `layouts/partials/`, nommé `logo.html`. Puis, écrivez le code HTML voulu. -Vous pourriez utiliser une balise HTML `img` et référencer une image créée dans le dossier *static*, voire même y coller un cod SVG ! - -{{% notice note %}} -La taille du logo va s'adapter automatiquement -{{% /notice %}} - -### Changer le favicon - -Si votre favicon est un png, déposez votre image dans votre dossier local `static/images/` et nommez le `favicon.png` - -Si vous avez besoin de changer ce comportement par défaut, créer un nouveau fichier dans `layouts/partials/` et nommez le `favicon.html`. Puis ajoutez quelque chose comme: - -```html - -``` - -### Changer les couleurs par défaut {#theme-variant} - -**Hugo Learn theme** vous permet de choisir nativement entre 3 schéma de couleurs, mais n'hésitez pas à en ajouter d'autres ! Les couleurs par défaut sont celles de [Grav Learn Theme](https://learn.getgrav.org/). - -#### Variante rouge - -```toml -[params] - # Modifier le schéma de couleur par défaut. Peut être "red", "blue", "green". - themeVariant = "red" -``` - -![Variante rouge](/basics/configuration/images/red-variant.png?width=60%) - -#### Variante bleue - -```toml -[params] - # Modifier le schéma de couleur par défaut. Peut être "red", "blue", "green". - themeVariant = "blue" -``` - -![Variante bleue](/basics/configuration/images/blue-variant.png?width=60%) - -#### Variante verte - -```toml -[params] - # Modifier le schéma de couleur par défaut. Peut être "red", "blue", "green". - themeVariant = "green" -``` - -![Variante verte](/basics/configuration/images/green-variant.png?width=60%) - -#### Votre variante - -Premièrement, créez un nouveau fichier CSS dans votre dossier `static/css`, préfixé par `theme` (ex: avec le theme_lemien_ `static/css/theme-lemien.css`). Copiez le contenu suivant et modifiez les couleurs dans les variables CSS. - -```css - -:root{ - - --MAIN-TEXT-color:#323232; /* Color of text by default */ - --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ - --MAIN-LINK-color:#1C90F3; /* Color of links */ - --MAIN-LINK-HOVER-color:#167ad0; /* Color of hovered links */ - --MAIN-ANCHOR-color: #1C90F3; /* color of anchors on titles */ - - --MENU-HEADER-BG-color:#1C90F3; /* Background color of menu header */ - --MENU-HEADER-BORDER-color:#33a1ff; /*Color of menu header border */ - - --MENU-SEARCH-BG-color:#167ad0; /* Search field background color (by default borders + icons) */ - --MENU-SEARCH-BOX-color: #33a1ff; /* Override search field border color */ - --MENU-SEARCH-BOX-ICONS-color: #a1d2fd; /* Override search field icons color */ - - --MENU-SECTIONS-ACTIVE-BG-color:#20272b; /* Background color of the active section and its childs */ - --MENU-SECTIONS-BG-color:#252c31; /* Background color of other sections */ - --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ - --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ - --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ - --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ - - --MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */ - --MENU-SECTION-HR-color: #20272b; /* Color of
separator in menu */ - -} - -body { - color: var(--MAIN-TEXT-color) !important; -} - -textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { - border-color: none; - box-shadow: none; -} - -h2, h3, h4, h5 { - color: var(--MAIN-TITLES-TEXT-color) !important; -} - -a { - color: var(--MAIN-LINK-color); -} - -.anchor { - color: var(--MAIN-ANCHOR-color); -} - -a:hover { - color: var(--MAIN-LINK-HOVER-color); -} - -#sidebar ul li.visited > a .read-icon { - color: var(--MENU-VISITED-color); -} - -#body a.highlight:after { - display: block; - content: ""; - height: 1px; - width: 0%; - -webkit-transition: width 0.5s ease; - -moz-transition: width 0.5s ease; - -ms-transition: width 0.5s ease; - transition: width 0.5s ease; - background-color: var(--MAIN-HOVER-color); -} -#sidebar { - background-color: var(--MENU-SECTIONS-BG-color); -} -#sidebar #header-wrapper { - background: var(--MENU-HEADER-BG-color); - color: var(--MENU-SEARCH-BOX-color); - border-color: var(--MENU-HEADER-BORDER-color); -} -#sidebar .searchbox { - border-color: var(--MENU-SEARCH-BOX-color); - background: var(--MENU-SEARCH-BG-color); -} -#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { - background: var(--MENU-SECTIONS-ACTIVE-BG-color); -} -#sidebar .searchbox * { - color: var(--MENU-SEARCH-BOX-ICONS-color); -} - -#sidebar a { - color: var(--MENU-SECTIONS-LINK-color); -} - -#sidebar a:hover { - color: var(--MENU-SECTIONS-LINK-HOVER-color); -} - -#sidebar ul li.active > a { - background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); - color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; -} - -#sidebar hr { - border-color: var(--MENU-SECTION-HR-color); -} -``` - -Puis, configurez le paramètre `themeVariant` avec le nom de votre variante. C'est tout ! - -```toml -[params] - # Modifier le schéma de couleur par défaut. Peut être "red", "blue", "green". - themeVariant = "lemien" -``` \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/blue-variant.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/blue-variant.png deleted file mode 100644 index 1797d47..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/blue-variant.png and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/green-variant.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/green-variant.png deleted file mode 100644 index 68d6158..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/green-variant.png and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/red-variant.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/red-variant.png deleted file mode 100644 index 3964f69..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/configuration/images/red-variant.png and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/_index.en.md deleted file mode 100644 index 19874d0..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/_index.en.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: Installation -weight: 15 ---- - -The following steps are here to help you initialize your new website. If you don't know Hugo at all, we strongly suggest you to train by following this [great documentation for beginners](https://gohugo.io/overview/quickstart/). - -## Create your project - -Hugo provides a `new` command to create a new website. - -``` -hugo new site -``` - -## Install the theme - -Install the **Hugo-theme-learn** theme by following [this documentation](https://gohugo.io/themes/installing/) - -The theme's repository is: https://github.com/matcornic/hugo-theme-learn.git - -Alternatively, you can [download the theme as .zip](https://github.com/matcornic/hugo-theme-learn/archive/master.zip) file and extract it in the themes directory - -## Basic configuration - -When building the website, you can set a theme by using `--theme` option. We suggest you to edit your configuration file and set the theme by default. By the way, add requirements for search functionnality to be enabled. - -```toml -# Change the default theme to be use when building the site with Hugo -theme = "hugo-theme-learn" - -# For search functionnality -[outputs] -home = [ "HTML", "RSS", "JSON"] -``` - -## Create your first chapter page - -Chapters are pages containg other child pages. It has a special layout style and usually just contains a _chapter name_, the _title_ and a _brief abstract_ of the section. - -``` -### Chapter 1 - -# Basics - -Discover what this Hugo theme is all about and the core-concepts behind it. -``` - -renders as - -![A Chapter](/basics/installation/images/chapter.png?classes=shadow&width=60%) - -**Hugo-theme-learn** provides archetypes to create skeletons for your website. Begin by creating your first chapter page with the following command - -``` -hugo new --kind chapter basics/_index.md -``` - -By opening the given file, you should see the property `chapter=true` on top, meaning this page is a _chapter_. - -## Create your first content pages - -Then, create content pages inside the previous chapter. Here are two ways to create content in the chapter : - -``` -hugo new basics/first-content.md -hugo new basics/second-content/_index.md -``` - -Feel free to edit thoses files by adding some sample content and replacing `title` value in the beginning of the files. - -## Launching the website locally - -Launch the following command: - -``` -hugo serve -``` - -Go to `http://localhost:1313` - -You should notice three things: - -1. You have a left **Basics** menu, containing two submenus with names equals to `title` properties in previously created files. -2. The home page explains you to how to customize it. Follow the instructions. -3. With `hugo serve` command, the page refresh as soon as you save a file. Neat ! - -## Build the website - -When your site is ready to deploy, launch the following command: - -``` -hugo -``` - -A `public` folder has been generated, containing all statics content and assets for your website. It can now be deployed on any web server ! - -{{% notice note %}} -This website can be automatically published and hosted with [Netlify](https://www.netlify.com/) (Read more about [Automated HUGO deployments with Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)). Alternatively, you can use [Github pages](https://gohugo.io/hosting-and-deployment/hosting-on-github/) -{{% /notice %}} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/_index.fr.md deleted file mode 100644 index 1e75140..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/_index.fr.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: Installation -weight: 15 ---- - -Les étapes suivantes sont là pour vous aider à initialiser votre site. Si vous ne connaissez pas du tout Hugo, il est fortement conseillé de vous entrainer en suivant ce [super tuto pour débutants](https://gohugo.io/overview/quickstart/). - -## Créer votre projet - -Hugo fournit une commande `new` pour créer un nouveau site. - -``` -hugo new site -``` - -## Installer le thème - -Installer le thème **Hugo-theme-learn** en suivant [cette documentation](https://gohugo.io/themes/installing/) - -Le repo du thème est : https://github.com/matcornic/hugo-theme-learn.git - -Sinon, vous pouvez [télécharger le thème sous forme d'un fichier .zip](https://github.com/matcornic/hugo-theme-learn/archive/master.zip) et extrayez le dans votre dossier de thèmes. - -## Configuration simple - -Lorsque vous générez votre site, vous pouvez définir un thème en utilisant l'option `--theme`. Il est conseillé de modifier votre fichier de configuration `config.toml` and définir votre thème par défaut. En passant, ajoutez les prérequis à l'utilisation de la fonctionnalité de recherche. - -```toml -# Modifiez le thème pour qu'il soit utilisé par défaut à chaque génération de site. -theme = "hugo-theme-learn" - -# Pour la fonctionnalité de recherche -[outputs] -home = [ "HTML", "RSS", "JSON"] -``` - -## Créer votre première page chapitre - -Les *chapitres* sont des pages contenant d'autre pages filles. Elles ont un affichage spécial et contiennent habituellement juste un _nom_ de chapitre, le _titre_ et un _résumé_ de la section. - -``` -### Chapitre 1 - -# Démarrage - -Découvrez comment utiliser ce thème Hugo et apprenez en les concepts -``` - -s'affiche comme - -![Un chapitre](/basics/installation/images/chapter.png?classes=shadow&width=60%) - -**Hugo-theme-learn** fournit des archétypes pour créer des squelettes pour votre site. Commencez par créer votre premier chapitre avec la commande suivante: - -``` -hugo new --kind chapter basics/_index.md -``` - -En ouvrant le fichier généré, vous devriez voir la propriété `chapter=true` en haut, paramètre quit définit que le page est un _chapitre_. - -## Créer votre première page - -Puis, créez votre premier page dans le chapitre précédent. Pour ce faire, il existe deux possibilités : - -``` -hugo new basics/first-content.md -hugo new basics/second-content/_index.md -``` - -N'hésitez pas à éditer ces fichiers en ajoutant des exemple de contenu et en remplaçant le paramètre `title` au début du fichier. - -## Lancer le site localement - -Lancez la commande suivante : - -``` -hugo serve -``` - -Se rendre sur `http://localhost:1313` - -Vous devriez voir trois choses: - -1. Vous avez un menu **Basics** à gauche, qui contient deux sous-menu avec des noms égal au paramètre `title` des fichiers précédemment générés. -2. La page d'accueil vous explique comment la modifier. Suivez les instructions. -3. Avec la commande `hugo serve`, la page se rafraichit automatiquement à chaque fois que vous sauvegardez. Super ! - -## Générez le site - -Quand votre site est prêt à être déployé, lancez la commande suivante: - -``` -hugo -``` - -Un dossier `public` a été généré. Il contient tout le contenu statique et les ressources nécessaires pour votre site. Votre site peut maintenant être déployé en utilisant n'importe quel serveur ! - -{{% notice note %}} -Ce site peut être automatiquement publié et hébergé avec [Netlify](https://www.netlify.com/) ([Plus d'infos](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)). Sinon, vous pouvez utiliser les [Github pages](https://gohugo.io/hosting-and-deployment/hosting-on-github/) -{{% /notice %}} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/images/chapter.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/images/chapter.png deleted file mode 100644 index 103a88e..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/installation/images/chapter.png and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/_index.en.md deleted file mode 100755 index b6d5b38..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/_index.en.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Requirements -weight: 10 -disableToc: true ---- - -Thanks to the simplicity of Hugo, this page is as empty as this theme needs requirements. - -Just download latest version of [Hugo binary (> 0.25)](https://gohugo.io/getting-started/installing/) for your OS (Windows, Linux, Mac) : it's that simple. - -![Magic](/basics/requirements/images/magic.gif?classes=shadow) diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/_index.fr.md deleted file mode 100755 index 6e07374..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/_index.fr.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Prérequis -weight: 10 -disableToc: true ---- - -Grâce à la simplicité d'Hugo, cette page est vide car il n'y a quasi pas de prérequis pour utiliser le thème. - -Téléchargez la dernière version du [binaire Hugo (> 0.25)](https://gohugo.io/getting-started/installing/) pour votre Système d'exploitation (Windows, Linux, Mac) : et c'est tout ! - -![Magic](/basics/requirements/images/magic.gif?classes=shadow) diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/images/magic.gif b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/images/magic.gif deleted file mode 100644 index 235c4ed..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/basics/requirements/images/magic.gif and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/_index.en.md deleted file mode 100755 index cbdc696..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/_index.en.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Content -weight: 10 -chapter: true -pre: "2. " ---- - -### Chapter 2 - -# Content - -Find out how to create and organize your content quickly and intuitively. diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/_index.fr.md deleted file mode 100755 index dae5873..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/_index.fr.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Contenu -weight: 10 -chapter: true -pre: "2. " ---- - -### Chapitre 2 - -# Contenu - -Découvrez comment créer et organiser votre contenu facilement et intuitivement. diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/archetypes.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/archetypes.en.md deleted file mode 100644 index 0e5350e..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/archetypes.en.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: Archetypes -weight: 10 ---- - -Using the command: `hugo new [relative new content path]`, you can start a content file with the date and title automatically set. While this is a welcome feature, active writers need more : [archetypes](https://gohugo.io/content/archetypes/). - -It is pre-configured skeleton pages with default front matter. Please refer to the documentation for types of page to understand the differences. - -## Chapter {#archetypes-chapter} - -To create a Chapter page, run the following commands - -``` -hugo new --kind chapter /_index.md -``` - -It will create a page with predefined Front-Matter: - -```markdown -+++ -title = "{{ replace .TranslationBaseName "-" " " | title }}" -date = {{ .Date }} -weight = 5 -chapter = true -pre = "X. " -+++ - -### Chapter X - -# Some Chapter title - -Lorem Ipsum. -``` - -## Default - -To create a default page, run either one of the following commands - -``` -# Either -hugo new //_index.md -# Or -hugo new /.md -``` - -It will create a page with predefined Front-Matter: - -```markdown -+++ -title = "{{ replace .TranslationBaseName "-" " " | title }}" -date = {{ .Date }} -weight = 5 -+++ - -Lorem Ipsum. -``` \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/archetypes.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/archetypes.fr.md deleted file mode 100644 index 57df1de..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/archetypes.fr.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: Archétypes -weight: 10 ---- - -En utilisant la commande: `hugo new [chemin vers nouveau contenu]`, vous pouvez créer un nouveau fichier avec la date et le title automatiquement initialisé. Même si c'est une fonctionnalité intéressante, elle reste limitée pour les auteurs actifs qui ont besoin de mieux : les [archetypes](https://gohugo.io/content/archetypes/). - -Les archétypes sont des squelettes de pages préconfigurées avec un Front Matter par défaut. Merci de vous référer à la documentation pour connaitre les différents types de page. - -## Chapitre {#archetypes-chapter} - -Pour créer un chapitre, lancez les commandes suivantes - -``` -hugo new --kind chapter /_index.md -``` - -Cela crééra une page avec le Front Matter suivant: - -```markdown -+++ -title = "{{ replace .TranslationBaseName "-" " " | title }}" -date = {{ .Date }} -weight = 5 -chapter = true -pre = "X. " -+++ - -### Chapter X - -# Some Chapter title - -Lorem Ipsum. -``` - -## Défaut - -Pour créer une page classique, lancer l'une des deux commandes suivantes - -``` -# Soit -hugo new //_index.md -# Ou -hugo new /.md -``` - -Cela crééra une page avec le Front Matter suivant: - -```markdown -+++ -title = "{{ replace .TranslationBaseName "-" " " | title }}" -date = {{ .Date }} -weight = 5 -+++ - -Lorem Ipsum. -``` \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/_index.en.md deleted file mode 100644 index f53d890..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/_index.en.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -date: 2016-04-09T16:50:16+02:00 -title: Multilingual and i18n -weight: 30 ---- - -**Learn theme** is fully compatible with Hugo multilingual mode. - -It provides: - -- Translation strings for default values (English and French). Feel free to contribute ! -- Automatic menu generation from multilingual content -- In-browser language switching - -![I18n menu](/cont/i18n/images/i18n-menu.gif) - -## Basic configuration - -After learning [how Hugo handle multilingual websites](https://gohugo.io/content-management/multilingual), define your languages in your `config.toml` file. - -For example with current French and English website. - -```toml -# English is the default language -defaultContentLanguage = "en" -# Force to have /en/my-page and /fr/my-page routes, even for default language. -defaultContentLanguageInSubdir= true - -[Languages] -[Languages.en] -title = "Documentation for Hugo Learn Theme" -weight = 1 -languageName = "English" - -[Languages.fr] -title = "Documentation du thème Hugo Learn" -weight = 2 -languageName = "Français" -``` - -Then, for each new page, append the *id* of the language to the file. - -- Single file `my-page.md` is split in two files: - - in English: `my-page.en.md` - - in French: `my-page.fr.md` -- Single file `_index.md` is split in two files: - - in English: `_index.en.md` - - in French: `_index.fr.md` - -{{% notice info %}} -Be aware that only translated pages are displayed in menu. It's not replaced with default language content. -{{% /notice %}} - -{{% notice tip %}} -Use [slug](https://gohugo.io/content-management/multilingual/#translate-your-content) Front Matter parameter to translate urls too. -{{% /notice %}} - -## Overwrite translation strings - -Translations strings are used for common default values used in the theme (*Edit this page* button, *Search placeholder* and so on). Translations are available in french and english but you may use another language or want to override default values. - -To override these values, create a new file in your local i18n folder `i18n/.toml` and inspire yourself from the theme `themes/hugo-theme-learn/i18n/en.toml` - -By the way, as these translations could be used by other people, please take the time to propose a translation by [making a PR](https://github.com/matcornic/hugo-theme-learn/pulls) to the theme ! - -## Disable language switching - -Switching the language in the browser is a great feature, but for some reasons you may want to disable it. - -Just set `disableLanguageSwitchingButton=true` in your `config.toml` - -```toml -[params] - # When using mulitlingual website, disable the switch language button. - disableLanguageSwitchingButton = true -``` - -![I18n menu](/cont/i18n/images/i18n-menu.gif) \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/_index.fr.md deleted file mode 100644 index c11f98f..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/_index.fr.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -date: 2016-04-09T16:50:16+02:00 -title: Multi-langue et i18n -weight: 30 ---- - -**Learne** est complètement compatible avec le mode multi-langue d'Hugo. - -Il fournit : - -- Des *translation strings* pour les valeurs par défaut utilisées par le thème (Anglais et Français). N'hésitez pas à contribuer ! -- Génération automatique du menu avec le contenu multi-langue -- Modification de la langue dans le navigateur - -![I18n menu](/cont/i18n/images/i18n-menu.gif) - -## Configuration simple - -Après avoir appris [comment Hugo gère les sites multi-langue](https://gohugo.io/content-management/multilingual), définissez vos langues dans votre fichier `config.toml`. - -Par exemple, pour ce site, avec du contenu en français et en anglais. - -```toml -# Anglais est la langue par défaut -defaultContentLanguage = "en" -# Force d'avoir /en/ma-page et /fr/ma-page routes, même avec la langue par défaut. -defaultContentLanguageInSubdir= true - -[Languages] -[Languages.en] -title = "Documentation for Hugo Learn Theme" -weight = 1 -languageName = "English" - -[Languages.fr] -title = "Documentation du thème Hugo Learn" -weight = 2 -languageName = "Français" -``` - -Puis, pour chaque nouvelle page, ajoutez *l'id* de la langue du fichier. - -- Le fichier `my-page.md` est découpé en deux fichiers : - - en anglais : `my-page.en.md` - - en français : `my-page.fr.md` -- Le fichier `_index.md` est découpé en deux fichiers : - - en anglais: `_index.en.md` - - en français: `_index.fr.md` - -{{% notice info %}} -Attention, seulement les pages traduites sont affichées dans le menu. Le contenu n'est pas remplacé par les pages de la langue par défaut. -{{% /notice %}} - -{{% notice tip %}} -Utilisez le paramètre du Front Matter [slug](https://gohugo.io/content-management/multilingual/#translate-your-content) pour traduire également les URLs. -{{% /notice %}} - -## Surcharger les *translation strings* - -Les *Translations strings* sont utilisées comme valeurs par défaut dans le thème (Bouton *Modifier la page*, Element de subsitution *Recherche*, etc.). Les traductions sont disponibles en français et en anglais mais vous pouvez utiliser n'importe quelle autre langue et surcharger avec vos propres valeurs. - -Pour surcharger ces valeurs, créer un nouveau fichier dans votre dossier i18n local `i18n/.toml` et inspirez vous du thème `themes/hugo-theme-learn/i18n/en.toml` - -D'ailleurs, ces traductions pour servir à tout le monde, donc svp prenez le temps de [proposer une Pull Request](https://github.com/matcornic/hugo-theme-learn/pulls) ! - -## Désactiver le changement de langue - -Vous pouvez changer de langue directement dans le navigateur. C'est une super fonctionnalité, mais vous avez peut-être besoin de la désactiver. - -Pour ce faire, ajouter le paramètre `disableLanguageSwitchingButton=true` dans votre `config.toml` - -```toml -[params] - # Quand vous utilisez un site en multi-langue, désactive le bouton de changment de langue. - disableLanguageSwitchingButton = true -``` - -![I18n menu](/cont/i18n/images/i18n-menu.gif) \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/images/i18n-menu.gif b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/images/i18n-menu.gif deleted file mode 100644 index 99ee222..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/i18n/images/i18n-menu.gif and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/markdown.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/markdown.en.md deleted file mode 100644 index c6d1ff8..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/markdown.en.md +++ /dev/null @@ -1,663 +0,0 @@ ---- -date: 2016-04-09T16:50:16+02:00 -title: Markdown syntax -weight: 15 ---- - -{{% notice note %}} -This page is a shameful copy of the great [Grav original page](http://learn.getgrav.org/content/markdown). -Only difference is information about image customization ([resizing]({{< relref "#resizing-image" >}}), [add CSS classes]({{< relref "#add-css-classes" >}})...) -{{% /notice%}} - -Let's face it: Writing content for the Web is tiresome. WYSIWYG editors help alleviate this task, but they generally result in horrible code, or worse yet, ugly web pages. - -**Markdown** is a better way to write **HTML**, without all the complexities and ugliness that usually accompanies it. - -Some of the key benefits are: - -1. Markdown is simple to learn, with minimal extra characters so it's also quicker to write content. -2. Less chance of errors when writing in markdown. -3. Produces valid XHTML output. -4. Keeps the content and the visual display separate, so you cannot mess up the look of your site. -5. Write in any text editor or Markdown application you like. -6. Markdown is a joy to use! - -John Gruber, the author of Markdown, puts it like this: - -> The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown’s syntax is the format of plain text email. -> -- John Gruber - - -Grav ships with built-in support for [Markdown](http://daringfireball.net/projects/markdown/) and [Markdown Extra](https://michelf.ca/projects/php-markdown/extra/). You must enable **Markdown Extra** in your `system.yaml` configuration file - -Without further delay, let us go over the main elements of Markdown and what the resulting HTML looks like: - -{{% notice info %}} - Bookmark this page for easy future reference! -{{% /notice %}} - -## Headings - -Headings from `h1` through `h6` are constructed with a `#` for each level: - -```markdown -# h1 Heading -## h2 Heading -### h3 Heading -#### h4 Heading -##### h5 Heading -###### h6 Heading -``` - -Renders to: - -# h1 Heading -## h2 Heading -### h3 Heading -#### h4 Heading -##### h5 Heading -###### h6 Heading - -HTML: - -```html -

h1 Heading

-

h2 Heading

-

h3 Heading

-

h4 Heading

-
h5 Heading
-
h6 Heading
-``` - -## Comments - -Comments should be HTML compatible - -```html - -``` -Comment below should **NOT** be seen: - - - - -## Horizontal Rules - -The HTML `
` element is for creating a "thematic break" between paragraph-level elements. In markdown, you can create a `
` with any of the following: - -* `___`: three consecutive underscores -* `---`: three consecutive dashes -* `***`: three consecutive asterisks - -renders to: - -___ - ---- - -*** - - -## Body Copy - -Body copy written as normal, plain text will be wrapped with `

` tags in the rendered HTML. - -So this body copy: - -```markdown -Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad. -``` -renders to this HTML: - -```html -

Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.

-``` - -## Emphasis - -### Bold -For emphasizing a snippet of text with a heavier font-weight. - -The following snippet of text is **rendered as bold text**. - -```markdown -**rendered as bold text** -``` -renders to: - -**rendered as bold text** - -and this HTML - -```html -rendered as bold text -``` - -### Italics -For emphasizing a snippet of text with italics. - -The following snippet of text is _rendered as italicized text_. - -```markdown -_rendered as italicized text_ -``` - -renders to: - -_rendered as italicized text_ - -and this HTML: - -```html -rendered as italicized text -``` - - -### strikethrough -In GFM (GitHub flavored Markdown) you can do strikethroughs. - -```markdown -~~Strike through this text.~~ -``` -Which renders to: - -~~Strike through this text.~~ - -HTML: - -```html -Strike through this text. -``` - -## Blockquotes -For quoting blocks of content from another source within your document. - -Add `>` before any text you want to quote. - -```markdown -> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined. -``` - -Renders to: - -> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined. - -and this HTML: - -```html -
-

Fusion Drive combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.

-
-``` - -Blockquotes can also be nested: - -```markdown -> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. -Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. ->> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor -odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. -``` - -Renders to: - -> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. -Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. ->> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor -odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. - - -## Notices - -{{% notice note %}} -The old mechanism for notices overriding the block quote syntax (`>>>`) has been deprecated. Notices are now handled via a dedicated plugin called [Markdown Notices](https://github.com/getgrav/grav-plugin-markdown-notices) -{{% /notice %}} - - -## Lists - -### Unordered -A list of items in which the order of the items does not explicitly matter. - -You may use any of the following symbols to denote bullets for each list item: - -```markdown -* valid bullet -- valid bullet -+ valid bullet -``` - -For example - -```markdown -+ Lorem ipsum dolor sit amet -+ Consectetur adipiscing elit -+ Integer molestie lorem at massa -+ Facilisis in pretium nisl aliquet -+ Nulla volutpat aliquam velit - - Phasellus iaculis neque - - Purus sodales ultricies - - Vestibulum laoreet porttitor sem - - Ac tristique libero volutpat at -+ Faucibus porta lacus fringilla vel -+ Aenean sit amet erat nunc -+ Eget porttitor lorem -``` -Renders to: - -+ Lorem ipsum dolor sit amet -+ Consectetur adipiscing elit -+ Integer molestie lorem at massa -+ Facilisis in pretium nisl aliquet -+ Nulla volutpat aliquam velit - - Phasellus iaculis neque - - Purus sodales ultricies - - Vestibulum laoreet porttitor sem - - Ac tristique libero volutpat at -+ Faucibus porta lacus fringilla vel -+ Aenean sit amet erat nunc -+ Eget porttitor lorem - -And this HTML - -```html -
    -
  • Lorem ipsum dolor sit amet
  • -
  • Consectetur adipiscing elit
  • -
  • Integer molestie lorem at massa
  • -
  • Facilisis in pretium nisl aliquet
  • -
  • Nulla volutpat aliquam velit -
      -
    • Phasellus iaculis neque
    • -
    • Purus sodales ultricies
    • -
    • Vestibulum laoreet porttitor sem
    • -
    • Ac tristique libero volutpat at
    • -
    -
  • -
  • Faucibus porta lacus fringilla vel
  • -
  • Aenean sit amet erat nunc
  • -
  • Eget porttitor lorem
  • -
-``` - -### Ordered - -A list of items in which the order of items does explicitly matter. - -```markdown -1. Lorem ipsum dolor sit amet -2. Consectetur adipiscing elit -3. Integer molestie lorem at massa -4. Facilisis in pretium nisl aliquet -5. Nulla volutpat aliquam velit -6. Faucibus porta lacus fringilla vel -7. Aenean sit amet erat nunc -8. Eget porttitor lorem -``` -Renders to: - -1. Lorem ipsum dolor sit amet -2. Consectetur adipiscing elit -3. Integer molestie lorem at massa -4. Facilisis in pretium nisl aliquet -5. Nulla volutpat aliquam velit -6. Faucibus porta lacus fringilla vel -7. Aenean sit amet erat nunc -8. Eget porttitor lorem - -And this HTML: - -```html -
    -
  1. Lorem ipsum dolor sit amet
  2. -
  3. Consectetur adipiscing elit
  4. -
  5. Integer molestie lorem at massa
  6. -
  7. Facilisis in pretium nisl aliquet
  8. -
  9. Nulla volutpat aliquam velit
  10. -
  11. Faucibus porta lacus fringilla vel
  12. -
  13. Aenean sit amet erat nunc
  14. -
  15. Eget porttitor lorem
  16. -
-``` - -**TIP**: If you just use `1.` for each number, Markdown will automatically number each item. For example: - -```markdown -1. Lorem ipsum dolor sit amet -1. Consectetur adipiscing elit -1. Integer molestie lorem at massa -1. Facilisis in pretium nisl aliquet -1. Nulla volutpat aliquam velit -1. Faucibus porta lacus fringilla vel -1. Aenean sit amet erat nunc -1. Eget porttitor lorem -``` - -Renders to: - -1. Lorem ipsum dolor sit amet -2. Consectetur adipiscing elit -3. Integer molestie lorem at massa -4. Facilisis in pretium nisl aliquet -5. Nulla volutpat aliquam velit -6. Faucibus porta lacus fringilla vel -7. Aenean sit amet erat nunc -8. Eget porttitor lorem - -## Code - -### Inline code -Wrap inline snippets of code with `` ` ``. - -```markdown -In this example, `
` should be wrapped as **code**. -``` - -Renders to: - -In this example, `
` should be wrapped with **code**. - -HTML: - -```html -

In this example, <section></section> should be wrapped with code.

-``` - -### Indented code - -Or indent several lines of code by at least four spaces, as in: - -
-  // Some comments
-  line 1 of code
-  line 2 of code
-  line 3 of code
-
- -Renders to: - - // Some comments - line 1 of code - line 2 of code - line 3 of code - -HTML: - -```html -
-  
-    // Some comments
-    line 1 of code
-    line 2 of code
-    line 3 of code
-  
-
-``` - - -### Block code "fences" - -Use "fences" ```` ``` ```` to block in multiple lines of code. - -
-``` markup
-Sample text here...
-```
-
- - -``` -Sample text here... -``` - -HTML: - -```html -
-  Sample text here...
-
-``` - -### Syntax highlighting - -GFM, or "GitHub Flavored Markdown" also supports syntax highlighting. To activate it, simply add the file extension of the language you want to use directly after the first code "fence", ` ```js `, and syntax highlighting will automatically be applied in the rendered HTML. For example, to apply syntax highlighting to JavaScript code: - -
-```js
-grunt.initConfig({
-  assemble: {
-    options: {
-      assets: 'docs/assets',
-      data: 'src/data/*.{json,yml}',
-      helpers: 'src/custom-helpers.js',
-      partials: ['src/partials/**/*.{hbs,md}']
-    },
-    pages: {
-      options: {
-        layout: 'default.hbs'
-      },
-      files: {
-        './': ['src/templates/pages/index.hbs']
-      }
-    }
-  }
-};
-```
-
- -Renders to: - -```js -grunt.initConfig({ - assemble: { - options: { - assets: 'docs/assets', - data: 'src/data/*.{json,yml}', - helpers: 'src/custom-helpers.js', - partials: ['src/partials/**/*.{hbs,md}'] - }, - pages: { - options: { - layout: 'default.hbs' - }, - files: { - './': ['src/templates/pages/index.hbs'] - } - } - } -}; -``` - -## Tables -Tables are created by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header. Note that the pipes do not need to be vertically aligned. - - -```markdown -| Option | Description | -| ------ | ----------- | -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | -``` - -Renders to: - -| Option | Description | -| ------ | ----------- | -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | - -And this HTML: - -```html - - - - - - - - - - - - - - - - - -
OptionDescription
datapath to data files to supply the data that will be passed into templates.
engineengine to be used for processing templates. Handlebars is the default.
extextension to be used for dest files.
-``` - -### Right aligned text - -Adding a colon on the right side of the dashes below any heading will right align text for that column. - -```markdown -| Option | Description | -| ------:| -----------:| -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | -``` - -| Option | Description | -| ------:| -----------:| -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | - -## Links - -### Basic link - -```markdown -[Assemble](http://assemble.io) -``` - -Renders to (hover over the link, there is no tooltip): - -[Assemble](http://assemble.io) - -HTML: - -```html -Assemble -``` - - -### Add a title - -```markdown -[Upstage](https://github.com/upstage/ "Visit Upstage!") -``` - -Renders to (hover over the link, there should be a tooltip): - -[Upstage](https://github.com/upstage/ "Visit Upstage!") - -HTML: - -```html -Upstage -``` - -### Named Anchors - -Named anchors enable you to jump to the specified anchor point on the same page. For example, each of these chapters: - -```markdown -# Table of Contents - * [Chapter 1](#chapter-1) - * [Chapter 2](#chapter-2) - * [Chapter 3](#chapter-3) -``` -will jump to these sections: - -```markdown -## Chapter 1 -Content for chapter one. - -## Chapter 2 -Content for chapter one. - -## Chapter 3 -Content for chapter one. -``` -**NOTE** that specific placement of the anchor tag seems to be arbitrary. They are placed inline here since it seems to be unobtrusive, and it works. - -## Images {#images} -Images have a similar syntax to links but include a preceding exclamation point. - -```markdown -![Minion](http://octodex.github.com/images/minion.png) -``` -![Minion](http://octodex.github.com/images/minion.png) - -or -```markdown -![Alt text](http://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") -``` -![Alt text](http://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") - -Like links, Images also have a footnote style syntax - -### Alternative usage : note images - -```markdown -![Alt text][id] -``` -![Alt text][id] - -With a reference later in the document defining the URL location: - -[id]: http://octodex.github.com/images/dojocat.jpg "The Dojocat" - - [id]: http://octodex.github.com/images/dojocat.jpg "The Dojocat" - -### Resizing image - -Add HTTP parameters `width` and/or `height` to the link image to resize the image. Values are CSS values (default is `auto`). - -```markdown -![Minion](http://octodex.github.com/images/minion.png?width=20%) -``` - -![Minion](http://octodex.github.com/images/minion.png?width=20%) - -```markdown -![Minion](http://octodex.github.com/images/minion.png?height=50px) -``` - -![Minion](http://octodex.github.com/images/minion.png?height=50px) - -```markdown -![Minion](http://octodex.github.com/images/minion.png?height=50px&width=300px) -``` - -![Minion](http://octodex.github.com/images/minion.png?height=50px&width=300px) - -### Add CSS classes - -Add a HTTP `classes` parameter to the link image to add CSS classes. `shadow`and `border` are available but you could define other ones. - -```markdown -![stormtroopocat](http://octodex.github.com/images/stormtroopocat.jpg?classes=shadow) -``` -![stormtroopocat](http://octodex.github.com/images/stormtroopocat.jpg?width=40%&classes=shadow) - -```markdown -![stormtroopocat](http://octodex.github.com/images/stormtroopocat.jpg?classes=border) -``` -![stormtroopocat](http://octodex.github.com/images/stormtroopocat.jpg?width=40%&classes=border) - -```markdown -![stormtroopocat](http://octodex.github.com/images/stormtroopocat.jpg?classes=border,shadow) -``` -![stormtroopocat](http://octodex.github.com/images/stormtroopocat.jpg?width=40%&classes=border,shadow) diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/markdown.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/markdown.fr.md deleted file mode 100644 index aa7296e..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/markdown.fr.md +++ /dev/null @@ -1,665 +0,0 @@ ---- -date: 2016-04-09T16:50:16+02:00 -title: Syntaxe Markdown -weight: 15 ---- - -{{% notice note %}} -Cette page est une copie de la [doc de Grav](http://learn.getgrav.org/content/markdown). -La seule différence porte sur la personalisation des images ([taille]({{< relref "#resizing-image" >}}), [ajout de classes CSS]({{< relref "#add-css-classes" >}})...) -Pour des raisons évidentes, cette page n'a pas été traduites en français 😁 -{{% /notice%}} - -Let's face it: Writing content for the Web is tiresome. WYSIWYG editors help alleviate this task, but they generally result in horrible code, or worse yet, ugly web pages. - -**Markdown** is a better way to write **HTML**, without all the complexities and ugliness that usually accompanies it. - -Some of the key benefits are: - -1. Markdown is simple to learn, with minimal extra characters so it's also quicker to write content. -2. Less chance of errors when writing in markdown. -3. Produces valid XHTML output. -4. Keeps the content and the visual display separate, so you cannot mess up the look of your site. -5. Write in any text editor or Markdown application you like. -6. Markdown is a joy to use! - -John Gruber, the author of Markdown, puts it like this: - -> The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown’s syntax is the format of plain text email. -> -- John Gruber - - -Grav ships with built-in support for [Markdown](http://daringfireball.net/projects/markdown/) and [Markdown Extra](https://michelf.ca/projects/php-markdown/extra/). You must enable **Markdown Extra** in your `system.yaml` configuration file - -Without further delay, let us go over the main elements of Markdown and what the resulting HTML looks like: - -{{% notice info %}} - Bookmark this page for easy future reference! -{{% /notice %}} - -## Headings - -Headings from `h1` through `h6` are constructed with a `#` for each level: - -```markdown -# h1 Heading -## h2 Heading -### h3 Heading -#### h4 Heading -##### h5 Heading -###### h6 Heading -``` - -Renders to: - -# h1 Heading -## h2 Heading -### h3 Heading -#### h4 Heading -##### h5 Heading -###### h6 Heading - -HTML: - -```html -

h1 Heading

-

h2 Heading

-

h3 Heading

-

h4 Heading

-
h5 Heading
-
h6 Heading
-``` - -## Comments - -Comments should be HTML compatible - -```html - -``` -Comment below should **NOT** be seen: - - - - -## Horizontal Rules - -The HTML `
` element is for creating a "thematic break" between paragraph-level elements. In markdown, you can create a `
` with any of the following: - -* `___`: three consecutive underscores -* `---`: three consecutive dashes -* `***`: three consecutive asterisks - -renders to: - -___ - ---- - -*** - - -## Body Copy - -Body copy written as normal, plain text will be wrapped with `

` tags in the rendered HTML. - -So this body copy: - -```markdown -Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad. -``` -renders to this HTML: - -```html -

Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.

-``` - -## Emphasis - -### Bold -For emphasizing a snippet of text with a heavier font-weight. - -The following snippet of text is **rendered as bold text**. - -```markdown -**rendered as bold text** -``` -renders to: - -**rendered as bold text** - -and this HTML - -```html -rendered as bold text -``` - -### Italics -For emphasizing a snippet of text with italics. - -The following snippet of text is _rendered as italicized text_. - -```markdown -_rendered as italicized text_ -``` - -renders to: - -_rendered as italicized text_ - -and this HTML: - -```html -rendered as italicized text -``` - - -### strikethrough -In GFM (GitHub flavored Markdown) you can do strikethroughs. - -```markdown -~~Strike through this text.~~ -``` -Which renders to: - -~~Strike through this text.~~ - -HTML: - -```html -Strike through this text. -``` - -## Blockquotes -For quoting blocks of content from another source within your document. - -Add `>` before any text you want to quote. - -```markdown -> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined. -``` - -Renders to: - -> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined. - -and this HTML: - -```html -
-

Fusion Drive combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.

-
-``` - -Blockquotes can also be nested: - -```markdown -> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. -Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. ->> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor -odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. -``` - -Renders to: - -> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. -Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. ->> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor -odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. - - -## Notices - -{{% notice note %}} -The old mechanism for notices overriding the block quote syntax (`>>>`) has been deprecated. Notices are now handled via a dedicated plugin called [Markdown Notices](https://github.com/getgrav/grav-plugin-markdown-notices) -{{% /notice %}} - - -## Lists - -### Unordered -A list of items in which the order of the items does not explicitly matter. - -You may use any of the following symbols to denote bullets for each list item: - -```markdown -* valid bullet -- valid bullet -+ valid bullet -``` - -For example - -```markdown -+ Lorem ipsum dolor sit amet -+ Consectetur adipiscing elit -+ Integer molestie lorem at massa -+ Facilisis in pretium nisl aliquet -+ Nulla volutpat aliquam velit - - Phasellus iaculis neque - - Purus sodales ultricies - - Vestibulum laoreet porttitor sem - - Ac tristique libero volutpat at -+ Faucibus porta lacus fringilla vel -+ Aenean sit amet erat nunc -+ Eget porttitor lorem -``` -Renders to: - -+ Lorem ipsum dolor sit amet -+ Consectetur adipiscing elit -+ Integer molestie lorem at massa -+ Facilisis in pretium nisl aliquet -+ Nulla volutpat aliquam velit - - Phasellus iaculis neque - - Purus sodales ultricies - - Vestibulum laoreet porttitor sem - - Ac tristique libero volutpat at -+ Faucibus porta lacus fringilla vel -+ Aenean sit amet erat nunc -+ Eget porttitor lorem - -And this HTML - -```html -
    -
  • Lorem ipsum dolor sit amet
  • -
  • Consectetur adipiscing elit
  • -
  • Integer molestie lorem at massa
  • -
  • Facilisis in pretium nisl aliquet
  • -
  • Nulla volutpat aliquam velit -
      -
    • Phasellus iaculis neque
    • -
    • Purus sodales ultricies
    • -
    • Vestibulum laoreet porttitor sem
    • -
    • Ac tristique libero volutpat at
    • -
    -
  • -
  • Faucibus porta lacus fringilla vel
  • -
  • Aenean sit amet erat nunc
  • -
  • Eget porttitor lorem
  • -
-``` - -### Ordered - -A list of items in which the order of items does explicitly matter. - -```markdown -1. Lorem ipsum dolor sit amet -2. Consectetur adipiscing elit -3. Integer molestie lorem at massa -4. Facilisis in pretium nisl aliquet -5. Nulla volutpat aliquam velit -6. Faucibus porta lacus fringilla vel -7. Aenean sit amet erat nunc -8. Eget porttitor lorem -``` -Renders to: - -1. Lorem ipsum dolor sit amet -2. Consectetur adipiscing elit -3. Integer molestie lorem at massa -4. Facilisis in pretium nisl aliquet -5. Nulla volutpat aliquam velit -6. Faucibus porta lacus fringilla vel -7. Aenean sit amet erat nunc -8. Eget porttitor lorem - -And this HTML: - -```html -
    -
  1. Lorem ipsum dolor sit amet
  2. -
  3. Consectetur adipiscing elit
  4. -
  5. Integer molestie lorem at massa
  6. -
  7. Facilisis in pretium nisl aliquet
  8. -
  9. Nulla volutpat aliquam velit
  10. -
  11. Faucibus porta lacus fringilla vel
  12. -
  13. Aenean sit amet erat nunc
  14. -
  15. Eget porttitor lorem
  16. -
-``` - -**TIP**: If you just use `1.` for each number, Markdown will automatically number each item. For example: - -```markdown -1. Lorem ipsum dolor sit amet -1. Consectetur adipiscing elit -1. Integer molestie lorem at massa -1. Facilisis in pretium nisl aliquet -1. Nulla volutpat aliquam velit -1. Faucibus porta lacus fringilla vel -1. Aenean sit amet erat nunc -1. Eget porttitor lorem -``` - -Renders to: - -1. Lorem ipsum dolor sit amet -2. Consectetur adipiscing elit -3. Integer molestie lorem at massa -4. Facilisis in pretium nisl aliquet -5. Nulla volutpat aliquam velit -6. Faucibus porta lacus fringilla vel -7. Aenean sit amet erat nunc -8. Eget porttitor lorem - -## Code - -### Inline code -Wrap inline snippets of code with `` ` ``. - -```markdown -In this example, `
` should be wrapped as **code**. -``` - -Renders to: - -In this example, `
` should be wrapped with **code**. - -HTML: - -```html -

In this example, <section></section> should be wrapped with code.

-``` - -### Indented code - -Or indent several lines of code by at least four spaces, as in: - -
-  // Some comments
-  line 1 of code
-  line 2 of code
-  line 3 of code
-
- -Renders to: - - // Some comments - line 1 of code - line 2 of code - line 3 of code - -HTML: - -```html -
-  
-    // Some comments
-    line 1 of code
-    line 2 of code
-    line 3 of code
-  
-
-``` - - -### Block code "fences" - -Use "fences" ```` ``` ```` to block in multiple lines of code. - -
-``` markup
-Sample text here...
-```
-
- - -``` -Sample text here... -``` - -HTML: - -```html -
-  Sample text here...
-
-``` - -### Syntax highlighting - -GFM, or "GitHub Flavored Markdown" also supports syntax highlighting. To activate it, simply add the file extension of the language you want to use directly after the first code "fence", ` ```js `, and syntax highlighting will automatically be applied in the rendered HTML. For example, to apply syntax highlighting to JavaScript code: - -
-```js
-grunt.initConfig({
-  assemble: {
-    options: {
-      assets: 'docs/assets',
-      data: 'src/data/*.{json,yml}',
-      helpers: 'src/custom-helpers.js',
-      partials: ['src/partials/**/*.{hbs,md}']
-    },
-    pages: {
-      options: {
-        layout: 'default.hbs'
-      },
-      files: {
-        './': ['src/templates/pages/index.hbs']
-      }
-    }
-  }
-};
-```
-
- -Renders to: - -```js -grunt.initConfig({ - assemble: { - options: { - assets: 'docs/assets', - data: 'src/data/*.{json,yml}', - helpers: 'src/custom-helpers.js', - partials: ['src/partials/**/*.{hbs,md}'] - }, - pages: { - options: { - layout: 'default.hbs' - }, - files: { - './': ['src/templates/pages/index.hbs'] - } - } - } -}; -``` - -## Tables -Tables are created by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header. Note that the pipes do not need to be vertically aligned. - - -```markdown -| Option | Description | -| ------ | ----------- | -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | -``` - -Renders to: - -| Option | Description | -| ------ | ----------- | -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | - -And this HTML: - -```html - - - - - - - - - - - - - - - - - -
OptionDescription
datapath to data files to supply the data that will be passed into templates.
engineengine to be used for processing templates. Handlebars is the default.
extextension to be used for dest files.
-``` - -### Right aligned text - -Adding a colon on the right side of the dashes below any heading will right align text for that column. - -```markdown -| Option | Description | -| ------:| -----------:| -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | -``` - -| Option | Description | -| ------:| -----------:| -| data | path to data files to supply the data that will be passed into templates. | -| engine | engine to be used for processing templates. Handlebars is the default. | -| ext | extension to be used for dest files. | - -## Links - -### Basic link - -```markdown -[Assemble](http://assemble.io) -``` - -Renders to (hover over the link, there is no tooltip): - -[Assemble](http://assemble.io) - -HTML: - -```html -Assemble -``` - - -### Add a title - -```markdown -[Upstage](https://github.com/upstage/ "Visit Upstage!") -``` - -Renders to (hover over the link, there should be a tooltip): - -[Upstage](https://github.com/upstage/ "Visit Upstage!") - -HTML: - -```html -Upstage -``` - -### Named Anchors - -Named anchors enable you to jump to the specified anchor point on the same page. For example, each of these chapters: - -```markdown -# Table of Contents - * [Chapter 1](#chapter-1) - * [Chapter 2](#chapter-2) - * [Chapter 3](#chapter-3) -``` -will jump to these sections: - -```markdown -## Chapter 1 -Content for chapter one. - -## Chapter 2 -Content for chapter one. - -## Chapter 3 -Content for chapter one. -``` -**NOTE** that specific placement of the anchor tag seems to be arbitrary. They are placed inline here since it seems to be unobtrusive, and it works. - - -## Images {#images} -Images have a similar syntax to links but include a preceding exclamation point. - -```markdown -![Minion](http://octodex.github.com/images/minion.png) -``` -![Minion](http://octodex.github.com/images/minion.png) - -or -```markdown -![Alt text](http://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") -``` -![Alt text](http://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") - -Like links, Images also have a footnote style syntax - -### Alternative usage : note images - -```markdown -![Alt text][id] -``` -![Alt text][id] - -With a reference later in the document defining the URL location: - -[id]: http://octodex.github.com/images/dojocat.jpg "The Dojocat" - - [id]: http://octodex.github.com/images/dojocat.jpg "The Dojocat" - -### Resizing image - -Add HTTP parameters `width` and/or `height` to the link image to resize the image. Values are CSS values (default is `auto`). - -```markdown -![Minion](http://octodex.github.com/images/minion.png?width=20%) -``` - -![Minion](http://octodex.github.com/images/minion.png?width=20%) - -```markdown -![Minion](http://octodex.github.com/images/minion.png?height=50px) -``` - -![Minion](http://octodex.github.com/images/minion.png?height=50px) - -```markdown -![Minion](http://octodex.github.com/images/minion.png?height=50px&width=300px) -``` - -![Minion](http://octodex.github.com/images/minion.png?height=50px&width=300px) - -### Add CSS classes - -Add a HTTP `classes` parameter to the link image to add CSS classes. `shadow`and `border` are available but you could define other ones. - -```markdown -![stormtroopocat](http://octodex.github.com/images/stormtroopocat.jpg?classes=shadow) -``` -![stormtroopocat](http://octodex.github.com/images/stormtroopocat.jpg?width=40%&classes=shadow) - -```markdown -![stormtroopocat](http://octodex.github.com/images/stormtroopocat.jpg?classes=border) -``` -![stormtroopocat](http://octodex.github.com/images/stormtroopocat.jpg?width=40%&classes=border) - -```markdown -![stormtroopocat](http://octodex.github.com/images/stormtroopocat.jpg?classes=border,shadow) -``` -![stormtroopocat](http://octodex.github.com/images/stormtroopocat.jpg?width=40%&classes=border,shadow) diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/menushortcuts.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/menushortcuts.en.md deleted file mode 100644 index a5a2a1d..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/menushortcuts.en.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -date: 2016-04-09T16:50:16+02:00 -title: Menu extra shortcuts -weight: 25 ---- - -You can define additional menu entries or shortcuts in the navigation menu without any link to content. - -## Basic configuration - -Edit the website configuration `config.toml` and add a `[[menu.shortcuts]]` entry for each link your want to add. - -Example from the current website: - - [[menu.shortcuts]] - name = " Github repo" - identifier = "ds" - url = "https://github.com/matcornic/hugo-theme-learn" - weight = 10 - - [[menu.shortcuts]] - name = " Showcases" - url = "/showcase" - weight = 11 - - [[menu.shortcuts]] - name = " Hugo Documentation" - identifier = "hugodoc" - url = "https://gohugo.io/" - weight = 20 - - [[menu.shortcuts]] - name = " Credits" - url = "/credits" - weight = 30 - -By default, shortcuts are preceded by a title. This title can be disabled by setting `disableShortcutsTitle=true`. -However, if you want to keep the title but change its value, it can be overriden by changing your local i18n translation string configuration. - -For example, in your local `i18n/en.toml` file, add the following content - - [Shortcuts-Title] - other = "" - -Read more about [hugo menu](https://gohugo.io/extras/menus/) and [hugo i18n translation strings](https://gohugo.io/content-management/multilingual/#translation-of-strings) - -## Configuration for Multilingual mode {#i18n} - -When using a multilingual website, you can set different menus for each language. In the `config.toml` file, prefix your menu configuration by `Languages.`. - - -Example from the current website: - - [Languages] - [Languages.en] - title = "Documentation for Hugo Learn Theme" - weight = 1 - languageName = "English" - - [[Languages.en.menu.shortcuts]] - name = " Github repo" - identifier = "ds" - url = "https://github.com/matcornic/hugo-theme-learn" - weight = 10 - - [[Languages.en.menu.shortcuts]] - name = " Showcases" - url = "/showcase" - weight = 11 - - [[Languages.en.menu.shortcuts]] - name = " Hugo Documentation" - identifier = "hugodoc" - url = "https://gohugo.io/" - weight = 20 - - [[Languages.en.menu.shortcuts]] - name = " Credits" - url = "/credits" - weight = 30 - - [Languages.fr] - title = "Documentation du thème Hugo Learn" - weight = 2 - languageName = "Français" - - [[Languages.fr.menu.shortcuts]] - name = " Repo Github" - identifier = "ds" - url = "https://github.com/matcornic/hugo-theme-learn" - weight = 10 - - [[Languages.fr.menu.shortcuts]] - name = " Vitrine" - url = "/showcase" - weight = 11 - - [[Languages.fr.menu.shortcuts]] - name = " Documentation Hugo" - identifier = "hugodoc" - url = "https://gohugo.io/" - weight = 20 - - [[Languages.fr.menu.shortcuts]] - name = " Crédits" - url = "/credits" - weight = 30 - -Read more about [hugo menu](https://gohugo.io/extras/menus/) and [hugo multilingual menus](https://gohugo.io/content-management/multilingual/#menus) \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/menushortcuts.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/menushortcuts.fr.md deleted file mode 100644 index 80bb9db..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/menushortcuts.fr.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -date: 2016-04-09T16:50:16+02:00 -title: Raccourcis du menu -weight: 25 ---- - -Vous pouvez définir des entrées ou raccourcis supplémentaires dans le menu sans avoir besoin d'être lié à un contenu du site. - -## Configuration simple - -Editez le fichier de configuration `config.toml` et ajoutez une entrée `[[menu.shortcuts]]` pour chaque lien que vous voulez ajouter. - -Exemple pour ce site: - - [[menu.shortcuts]] - name = " Github repo" - identifier = "ds" - url = "https://github.com/matcornic/hugo-theme-learn" - weight = 10 - - [[menu.shortcuts]] - name = " Showcases" - url = "/showcase" - weight = 11 - - [[menu.shortcuts]] - name = " Hugo Documentation" - identifier = "hugodoc" - url = "https://gohugo.io/" - weight = 20 - - [[menu.shortcuts]] - name = " Credits" - url = "/credits" - weight = 30 - -Par défaut, les raccourcis sont précédés par un titre. Ce titre peut être désactivé en ajouter le paramètre `disableShortcutsTitle=true` dans la section `params` de votre `config.toml`. -Cependant, si vous voulez garder le titre mais changer sa valeur, vous pouvez modifier votre configuration multilangue locale en changeant les *translation string*. - -Par exemple, dans votre fichier local `i18n/en.toml`, ajouter le contenu - - [Shortcuts-Title] - other = "" - -Plus d'infos sur [les menus Hugo](https://gohugo.io/extras/menus/) et sur [les translations strings](https://gohugo.io/content-management/multilingual/#translation-of-strings) - -## Configuration pour le mode multi-langue {#i18n} - -Quand vous utilisez un site multi-langue, vous pouvez avoir des menus différents pour chaque langage. Dans le fichier de configuration `config.toml`, préfixez votre configuration par `Languages.`. - - -Par exemple, avec ce site : - - [Languages] - [Languages.en] - title = "Documentation for Hugo Learn Theme" - weight = 1 - languageName = "English" - - [[Languages.en.menu.shortcuts]] - name = " Github repo" - identifier = "ds" - url = "https://github.com/matcornic/hugo-theme-learn" - weight = 10 - - [[Languages.en.menu.shortcuts]] - name = " Showcases" - url = "/showcase" - weight = 11 - - [[Languages.en.menu.shortcuts]] - name = " Hugo Documentation" - identifier = "hugodoc" - url = "https://gohugo.io/" - weight = 20 - - [[Languages.en.menu.shortcuts]] - name = " Credits" - url = "/credits" - weight = 30 - - [Languages.fr] - title = "Documentation du thème Hugo Learn" - weight = 2 - languageName = "Français" - - [[Languages.fr.menu.shortcuts]] - name = " Repo Github" - identifier = "ds" - url = "https://github.com/matcornic/hugo-theme-learn" - weight = 10 - - [[Languages.fr.menu.shortcuts]] - name = " Vitrine" - url = "/showcase" - weight = 11 - - [[Languages.fr.menu.shortcuts]] - name = " Documentation Hugo" - identifier = "hugodoc" - url = "https://gohugo.io/" - weight = 20 - - [[Languages.fr.menu.shortcuts]] - name = " Crédits" - url = "/credits" - weight = 30 - -Plus d'infos sur [les menus Hugo](https://gohugo.io/extras/menus/) et les [menus multi-langue Hugo](https://gohugo.io/content-management/multilingual/#menus) \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/_index.en.md deleted file mode 100644 index 95c0a1b..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/_index.en.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -date: 2016-04-09T16:50:16+02:00 -title: Pages organization -weight: 5 ---- - -In **Hugo**, pages are the core of your site. Once it is configured, pages are definitely the added value to your documentation site. - -## Folders - -Organize your site like [any other Hugo project](https://gohugo.io/content/organization/). Typically, you will have a *content* folder with all your pages. - - content - ├── level-one - │ ├── level-two - │ │ ├── level-three - │ │ │ ├── level-four - │ │ │ │ ├── _index.md <-- /level-one/level-two/level-three/level-four - │ │ │ │ ├── page-4-a.md <-- /level-one/level-two/level-three/level-four/page-4-a - │ │ │ │ ├── page-4-b.md <-- /level-one/level-two/level-three/level-four/page-4-b - │ │ │ │ └── page-4-c.md <-- /level-one/level-two/level-three/level-four/page-4-c - │ │ │ ├── _index.md <-- /level-one/level-two/level-three - │ │ │ ├── page-3-a.md <-- /level-one/level-two/level-three/page-3-a - │ │ │ ├── page-3-b.md <-- /level-one/level-two/level-three/page-3-b - │ │ │ └── page-3-c.md <-- /level-one/level-two/level-three/page-3-c - │ │ ├── _index.md <-- /level-one/level-two - │ │ ├── page-2-a.md <-- /level-one/level-two/page-2-a - │ │ ├── page-2-b.md <-- /level-one/level-two/page-2-b - │ │ └── page-2-c.md <-- /level-one/level-two/page-2-c - │ ├── _index.md <-- /level-one - │ ├── page-1-a.md <-- /level-one/page-1-a - │ ├── page-1-b.md <-- /level-one/page-1-b - │ └── page-1-c.md <-- /level-one/page-1-c - ├── _index.md <-- / - └── page-top.md <-- /page-top - -{{% notice note %}} -`_index.md` is required in each folder, it’s your “folder home page” -{{% /notice %}} - -## Types - -**Hugo-theme-learn** defines two types of pages. *Default* and *Chapter*. Both can be used at any level of the documentation, the only difference being layout display. - -A **Chapter** displays a page meant to be used as introduction for a set of child pages. Commonly, it contains a simple title and a catch line to define content that can be found under it. -You can define any HTML as prefix for the menu. In the example below, it's just a number but that could be an [icon](https://fortawesome.github.io/Font-Awesome/). - -![Chapter page](/cont/pages/images/pages-chapter.png?width=50%) - -```markdown -+++ -title = "Basics" -chapter = true -weight = 5 -pre = "1. " -+++ - -### Chapter 1 - -# Basics - -Discover what this Hugo theme is all about and the core-concepts behind it. -``` - -To tell **Hugo-theme-learn** to consider a page as a chapter, set `chapter=true` in the Front Matter of the page. - -A **Default** page is any other content page. - -![Default page](/cont/pages/images/pages-default.png?width=50%) - -```toml -+++ -title = "Installation" -weight = 15 -+++ -``` - -The following steps are here to help you initialize your new website. If you don't know Hugo at all, we strongly suggest you to train by following this [great documentation for beginners](https://gohugo.io/overview/quickstart/). - -## Create your project - -Hugo provides a `new` command to create a new website. - -``` -hugo new site -``` - -**Hugo-theme-learn** provides [archetypes]({{< relref "cont/archetypes.fr.md" >}}) to help you create this kind of pages. - -## Front Matter configuration - -Each Hugo page has to define a [Front Matter](https://gohugo.io/content/front-matter/) in *yaml*, *toml* or *json*. - -**Hugo-theme-learn** uses the following parameters on top of Hugo ones : - -```toml -+++ -# Table of content (toc) is enabled by default. Set this parameter to true to disable it. -# Note: Toc is always disabled for chapter pages -disableToc = "false" -# The title of the page in menu will be prefixed by this HTML content -pre = "" -# The title of the page in menu will be postfixed by this HTML content -post = "" -# Set the page as a chapter, changing the way it's displayed -chapter = false -# Hide a menu entry by setting this to true -hidden = false -# Display name of this page modifier. If set, it will be displayed in the footer. -LastModifierDisplayName = "" -# Email of this page modifier. If set with LastModifierDisplayName, it will be displayed in the footer -LastModifierEmail = "" -+++ -``` - -### Add icon to a menu entry - -In the page frontmatter, add a `pre` param to insert any HTML code before the menu label. The example below uses the Github icon. - -```toml -+++ -title = "Github repo" -pre = " " -+++ -``` - -![Title with icon](/cont/pages/images/frontmatter-icon.png) - -### Ordering sibling menu/page entries - -Hugo provides a [flexible way](https://gohugo.io/content/ordering/) to handle order for your pages. - -The simplest way is to set `weight` parameter to a number. - -```toml -+++ -title = "My page" -weight = 5 -+++ -``` - -## Homepage - -To configure your home page, you basically have three choices: - -1. Create an `_index.md` document in `content` folder and fill the file with *Markdown content* -2. Create an `index.html` file in the `static` folder and fill the file with *HTML content* -3. Configure your server to automatically redirect home page to one your documentation page diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/_index.fr.md deleted file mode 100644 index 6da5338..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/_index.fr.md +++ /dev/null @@ -1,146 +0,0 @@ ---- -date: 2016-04-09T16:50:16+02:00 -title: Organisation des pages -weight: 5 ---- - -Dans **Hugo**, les pages sont le coeur de votre site. Une fois configurées, les pages sont la valeur ajoutée de votre site de documentation. - -## Dossiers - -Organisez votre site comment n'importe quel autre [projet Hugo](https://gohugo.io/content/organization/). Typiquement, vous allez avoir un dossier *content* avec vos pages. - - content - ├── niveau-un - │ ├── niveau-deux - │ │ ├── niveau-trois - │ │ │ ├── niveau-quatre - │ │ │ │ ├── _index.md <-- /niveau-un/niveau-deux/niveau-trois/niveau-quatre - │ │ │ │ ├── page-4-a.md <-- /niveau-un/niveau-deux/niveau-trois/niveau-quatre/page-4-a - │ │ │ │ ├── page-4-b.md <-- /niveau-un/niveau-deux/niveau-trois/niveau-quatre/page-4-b - │ │ │ │ └── page-4-c.md <-- /niveau-un/niveau-deux/niveau-trois/niveau-quatre/page-4-c - │ │ │ ├── _index.md <-- /niveau-un/niveau-deux/niveau-trois - │ │ │ ├── page-3-a.md <-- /niveau-un/niveau-deux/niveau-trois/page-3-a - │ │ │ ├── page-3-b.md <-- /niveau-un/niveau-deux/niveau-trois/page-3-b - │ │ │ └── page-3-c.md <-- /niveau-un/niveau-deux/niveau-trois/page-3-c - │ │ ├── _index.md <-- /niveau-un/niveau-deux - │ │ ├── page-2-a.md <-- /niveau-un/niveau-deux/page-2-a - │ │ ├── page-2-b.md <-- /niveau-un/niveau-deux/page-2-b - │ │ └── page-2-c.md <-- /niveau-un/niveau-deux/page-2-c - │ ├── _index.md <-- /niveau-un - │ ├── page-1-a.md <-- /niveau-un/page-1-a - │ ├── page-1-b.md <-- /niveau-un/page-1-b - │ └── page-1-c.md <-- /niveau-un/page-1-c - ├── _index.md <-- / - └── premiere-page.md <-- /premiere-page - -{{% notice note %}} -Le fichier `_index.md` est obligatoire dans chaque dossier, c'est en quelques rotes votre page d'accueil pour le dossier. -{{% /notice %}} - -## Types - -**Hugo-theme-learn** définit deux types de pages. *Défaut* et *Chapitre*. Les deux sont utilisables à n'importe quel niveau du site, la seule différence est dans l'affichage. - -Un **Chapitre** affiche une page vouée à être une introduction pour un ensemble de pages filles. Habituellement, il va seulement contenir un titre et un résumé de la section. -Vous pouvez définir n'importe quel contenu HTML comme préfixe de l'entrée du menu. Dans l'exemple ci-dessous, c'est juste un nombre mais vous pourriez utiliser une [icône](https://fortawesome.github.io/Font-Awesome/). - -![Page Chapitre](/cont/pages/images/pages-chapter.png?width=50%) - -```markdown -+++ -title = "Démarrage" -weight = 5 -pre = "1. " -chapter = true -+++ - -### Chapitre 1 - -# Démarrage - -Découvrez comment utiliser ce thème Hugo et apprenez en les concepts -``` - -Pour dire à **Hugo-theme-learn** de considérer la page comme un chapitre, configure `chapter=true` dans le Front Matter de la page. - -Une page **Défaut** est n'importe quelle autre page. - -![Page défaut](/cont/pages/images/pages-default.png?width=50%) - - +++ - title = "Installation" - weight = 15 - +++ - - The following steps are here to help you initialize your new website. If you don't know Hugo at all, we strongly suggest you to train by following this [great documentation for beginners](https://gohugo.io/overview/quickstart/). - - ## Create your project - - Hugo provides a `new` command to create a new website. - - ``` - hugo new site - ``` - -**Hugo-theme-learn** fournit des [archétypes]({{< relref "cont/archetypes.fr.md" >}}) pour vous aider à créer ce type de pages. - -## Configuration des Front Matter - -Chaque page Hugo doit définir un [Front Matter](https://gohugo.io/content/front-matter/) dans le format *yaml*, *toml* ou *json*. - -**Hugo-theme-learn** utilise les paramètres suivant en plus de ceux définis par Hugo: - -```toml -+++ -# Le Sommaire (table of content = toc) est activé par défaut. Modifier ce paramètre à true pour le désactiver. -# Note: Le sommaire est toujours désactivé pour les chapitres -disableToc = "false" -# Le titre de la page dans le menu sera préfixé par ce contentu HTML -pre = "" -# Le titre de la page dans le menu sera suffixé par ce contentu HTML -post = "" -# Modifier le type de la page pour changer l'affichage -chapter = false -# Cache la page du menu -hidden = false -# Nom de la personne qui a modifié la page. Quand configuré, sera affiché dans le pied de page. -LastModifierDisplayName = "" -# Email de la personne qui a modifié la page. Quand configuré, sera affiché dans le pied de page. -LastModifierEmail = "" -+++ -``` - -### Ajouter une icône à une entrée du menu - -Dans le Front Matter, ajouter un paramètre `pre` pour insérer du code HTML qui s'affichera avant le label du menu. L'exemple ci-dessous utilise l'icône de Github. - -```toml -+++ -title = "Repo Github" -pre = " " -+++ -``` - -![Titre avec icône](/cont/pages/images/frontmatter-icon.png) - -### Ordonner les entrées dans le menu - -Hugo permet de modifier facilement [l'ordre des menu](https://gohugo.io/content/ordering/). - -La manière la plus simple est de configurer le paramètre `weight` avec un nombre. - -```toml -+++ -title = "Ma page" -weight = 5 -+++ -``` - -## Page d'accueil - -Pour configurer votre page d'accueil, vous avez trois choix: - -1. Créer une page `_index.md` dans le dossier `content` et remplissez le fichier avec du *contenu Markdown* -2. Créer une page `index.html` dans le dossier `static` et remplissez le fichier avec du *contenu HTML* -3. Configurez votre serveur pour automatiquement rediriger la page d'accueil vers l'une de vos pages. diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/frontmatter-icon.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/frontmatter-icon.png deleted file mode 100644 index a8dd653..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/frontmatter-icon.png and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/pages-chapter.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/pages-chapter.png deleted file mode 100644 index 5139fa1..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/pages-chapter.png and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/pages-default.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/pages-default.png deleted file mode 100644 index cefefd4..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/cont/pages/images/pages-default.png and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/credits.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/credits.en.md deleted file mode 100644 index 54d7d06..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/credits.en.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Credits -disableToc: true ---- - -## Contributors - -Thanks to them for make Open Source Software a better place ! - -{{% ghcontributors "https://api.github.com/repos/matcornic/hugo-theme-learn/contributors?per_page=100" %}} - -And a special thanks to [@vjeantet](https://github.com/vjeantet) for his work on [docdock](https://github.com/vjeantet/hugo-theme-docdock), a fork of hugo-theme-learn. v2.0.0 of this theme is inspired by his work. - -## Packages and libraries -* [mermaid](https://knsv.github.io/mermaid) - generation of diagram and flowchart from text in a similar manner as markdown -* [font awesome](http://fontawesome.io/) - the iconic font and CSS framework -* [jQuery](https://jquery.com) - The Write Less, Do More, JavaScript Library -* [lunr](https://lunrjs.com) - Lunr enables you to provide a great search experience without the need for external, server-side, search services... -* [horsey](https://bevacqua.github.io/horsey/) - Progressive and customizable autocomplete component -* [clipboard.js](https://zenorocha.github.io/clipboard.js) - copy text to clipboard -* [highlight.js](https://highlightjs.org) - Javascript syntax highlighter -* [modernizr](https://modernizr.com) - A JavaScript toolkit that allows web developers to use new CSS3 and HTML5 features while maintaining a fine level of control over browsers that don't support - -## Tooling - -* [Netlify](https://www.netlify.com) - Continuous deployement and hosting of this documentation -* [Hugo](https://gohugo.io/) - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/credits.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/credits.fr.md deleted file mode 100644 index 39c6dd7..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/credits.fr.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Crédits -disableToc: true ---- - -## Contributeurs - -Merci à eux de rendre le monde Open Source meilleur ! - -{{% ghcontributors "https://api.github.com/repos/matcornic/hugo-theme-learn/contributors?per_page=100" %}} - -Et a grand merci à [@vjeantet](https://github.com/vjeantet) pour son travail sur [docdock](https://github.com/vjeantet/hugo-theme-docdock), un fork de _hugo-theme-learn_. La v2.0.0 du thème est en grande partie inspirée de son travail. - -## Packages et librairies -* [mermaid](https://knsv.github.io/mermaid) - géneration de diagrames et graphiques à partir de texte similaire à Markdown -* [font awesome](http://fontawesome.io/) - Le framework de polices iconiques -* [jQuery](https://jquery.com) - La plus connue des librairies Javascript -* [lunr](https://lunrjs.com) - Lunr fournit des fonctions de recherche sans service externe -* [horsey](https://bevacqua.github.io/horsey/) - Autocomplétion de composants (utiliser pour les suggestions de recherche) -* [clipboard.js](https://zenorocha.github.io/clipboard.js) - Copier le texte dans le presse-papier -* [highlight.js](https://highlightjs.org) - Mise en valeur de syntaxes -* [modernizr](https://modernizr.com) - Une boite à outil Javascript qui permet aux développeurs d'utiliser les dernières fonctionnalités de CSS et HTML5, même sur de vieux navigateurs. - -## Outils - -* [Netlify](https://www.netlify.com) - Déploiement continue et hébergement de cette documentation -* [Hugo](https://gohugo.io/) - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/_index.en.md deleted file mode 100644 index 754bb0f..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/_index.en.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -date: 2016-04-09T16:50:16+02:00 -title: Shortcodes -pre: "3. " -weight: 15 ---- - -Hugo uses Markdown for its simple content format. However, there are a lot of things that Markdown doesn’t support well. You could use pure HTML to expand possibilities. - -But this happens to be a bad idea. Everyone uses Markdown because it's pure and simple to read even non-rendered. You should avoid HTML to keep it as simple as possible. - -To avoid this limitations, Hugo created [shortcodes](https://gohugo.io/extras/shortcodes/). A shortcode is a simple snippet inside a page. - -**Hugo-theme-learn** provides multiple shortcodes on top of existing ones. - -{{%children style="h2" description="true" %}} diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/_index.fr.md deleted file mode 100644 index b084d9b..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/_index.fr.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -date: 2016-04-09T16:50:16+02:00 -title: Shortcodes -pre: "3. " -weight: 15 ---- - -Hugo utilise Markdown pour son format simple. Cependant, il y a beaucoup de chose que Markdown ne supporte pas bien. On pourrait utiliser du HTML pur pour améliorer les capacité du Markdown. - -Mais c'est probablement une mauvaise idée. Tout le monde utilise le Markdown parce que c'est pur et simple à lire même lorsqu'il est affiché en texte brut. Vous devez éviter le HTML autant que possible pour garder le contenu simple. - -Cependant, pour éviter les limitations, Hugo a créé les [shortcodes](https://gohugo.io/extras/shortcodes/). Un shortcode est un bout de code (*snippet*) dans une page. - -**Hugo-theme-learn** fournit de multiple shortcodes en plus de ceux existant. - -{{%children style="h2" description="true" %}} diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/BachGavotteShort.mp3 b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/BachGavotteShort.mp3 deleted file mode 100644 index 94e3d0e..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/BachGavotteShort.mp3 and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf deleted file mode 100644 index 97377e9..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf deleted file mode 100644 index e589c73..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/hugo.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/hugo.png deleted file mode 100644 index 48acf34..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/hugo.png and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4 b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4 deleted file mode 100644 index 9f1fe56..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4 and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.md deleted file mode 100644 index 81886b0..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.en.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Attachments -description : "The Attachments shortcode displays a list of files attached to a page." ---- - -The Attachments shortcode displays a list of files attached to a page. - -{{% attachments /%}} - -## Usage - -The shortcurt lists files found in a **specific folder**. -Currently, it support two implementations for pages - -1. If your page is a markdown file, attachements must be place in a **folder** named like your page and ending with **.files**. - - > * content - > * _index.md - > * page.files - > * attachment.pdf - > * page.md - -2. If your page is a **folder**, attachements must be place in a nested **'files'** folder. - - > * content - > * _index.md - > * page - > * index.md - > * files - > * attachment.pdf - -Be aware that if you use a multilingual website, you will need to have as many folders as languages. - -That's all ! - -### Parameters - -| Parameter | Default | Description | -|:--|:--|:--| -| title | "Attachments" | List's title | -| style | "" | Choose between "orange", "grey", "blue" and "green" for nice style | -| pattern | ".*" | A regular expressions, used to filter the attachments by file name.

The **pattern** parameter value must be [regular expressions](https://en.wikipedia.org/wiki/Regular_expression). - -For example: - -* To match a file suffix of 'jpg', use **.*jpg** (not *.jpg). -* To match file names ending in 'jpg' or 'png', use **.*(jpg|png)** - -### Examples - -#### List of attachments ending in pdf or mp4 - - - {{%/*attachments title="Related files" pattern=".*(pdf|mp4)"/*/%}} - -renders as - -{{%attachments title="Related files" pattern=".*(pdf|mp4)"/%}} - -#### Colored styled box - - {{%/*attachments style="orange" /*/%}} - -renders as - -{{% attachments style="orange" /%}} - - - {{%/*attachments style="grey" /*/%}} - -renders as - -{{% attachments style="grey" /%}} - - {{%/*attachments style="blue" /*/%}} - -renders as - -{{% attachments style="blue" /%}} - - {{%/*attachments style="green" /*/%}} - -renders as - -{{% attachments style="green" /%}} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/BachGavotteShort.mp3 b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/BachGavotteShort.mp3 deleted file mode 100644 index 94e3d0e..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/BachGavotteShort.mp3 and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/Carroll_AliceAuPaysDesMerveilles.pdf b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/Carroll_AliceAuPaysDesMerveilles.pdf deleted file mode 100644 index 97377e9..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/Carroll_AliceAuPaysDesMerveilles.pdf and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/adivorciarsetoca00cape.pdf b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/adivorciarsetoca00cape.pdf deleted file mode 100644 index e589c73..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/adivorciarsetoca00cape.pdf and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/hugo.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/hugo.png deleted file mode 100644 index 48acf34..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/hugo.png and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/movieselectricsheep-flock-244-32500-2.mp4 b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/movieselectricsheep-flock-244-32500-2.mp4 deleted file mode 100644 index 9f1fe56..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.files/movieselectricsheep-flock-244-32500-2.mp4 and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.md deleted file mode 100644 index c240939..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/attachments.fr.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Attachments (Pièces jointes) -description : "The Attachments shortcode displays a list of files attached to a page." ---- - -Le shortcode *Attachments* affiche une liste de pièces jointes d'une page. - -{{% attachments /%}} - -## Utilisation - -Le shortcode affiche la liste de fichiers trouvés dans un **dossier spécifique** -A l'heure actuelle, il supporte deux implémentations - -1. Si votre page est un fichier Markdown, les pièces jointes doivent être placée dans un **dossier** nommé comme le nom de la page et suffixé par **.files**. - - > * content - > * _index.md - > * page.files - > * attachment.pdf - > * page.md - -2. Si votre page est un **dossier**, les pièces jointes doivent être placées dans un dossier fils **'files'**. - - > * content - > * _index.md - > * page - > * index.md - > * files - > * attachment.pdf - -Attention, si votre site est multi-langue, vous devrez avec autant de dossier qu'il y a de langues. - -C'est tout ! - -### Paramètres - -| Paramètre | Défaut | Description | -|:--|:--|:--| -| title | "Pièces jointes" | Titre de la liste | -| style | "" | Choisir entre "orange", "grey", "blue" et "green" pour un style plus sympa | -| pattern | ".*" | Une expression régulière, utilisée pour filtrer les pièces jointes par leur nom de fichier.

Le paramètre **pattern** doit être une [expression régulière](https://en.wikipedia.org/wiki/Regular_expression). - -Par exemple: - -* Pour trouver les fichiers avec le suffixe 'jpg', utilisez **.*jpg** (pas *.jpg). -* Pour trouver les fichiers avec les suffixe 'jpg' ou 'png', utilisez **.*(jpg|png)** - -### Exemples - -#### Lister les pièces jointes de type pdf ou mp4 - - - {{%/*attachments title="Fichiers associés" pattern=".*(pdf|mp4)"/*/%}} - -s'affiche comme - -{{%attachments title="Fichiers associés" pattern=".*(pdf|mp4)"/%}} - -#### Modifier le style - - {{%/*attachments style="orange" /*/%}} - -s'affiche comme - -{{% attachments style="orange" /%}} - - - {{%/*attachments style="grey" /*/%}} - -s'affiche comme - -{{% attachments style="grey" /%}} - - {{%/*attachments style="blue" /*/%}} - -s'affiche comme - -{{% attachments style="blue" /%}} - - {{%/*attachments style="green" /*/%}} - -s'affiche comme - -{{% attachments style="green" /%}} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/button.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/button.en.md deleted file mode 100644 index eb43cbf..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/button.en.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Button -description : "Nice buttons on your page." ---- - -A button is a just a clickable button with optional icon. - -``` -{{%/* button href="https://getgrav.org/" */%}}Get Grav{{%/* /button */%}} -{{%/* button href="https://getgrav.org/" icon="fa fa-download" */%}}Get Grav with icon{{%/* /button */%}} -{{%/* button href="https://getgrav.org/" icon="fa fa-download" icon-position="right" */%}}Get Grav with icon right{{%/* /button */%}} -``` - -{{% button href="https://getgrav.org/" %}}Get Grav{{% /button %}} -{{% button href="https://getgrav.org/" icon="fa fa-download" %}}Get Grav with icon{{% /button %}} -{{% button href="https://getgrav.org/" icon="fa fa-download" icon-position="right" %}}Get Grav with icon right{{% /button %}} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/button.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/button.fr.md deleted file mode 100644 index 9f0e130..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/button.fr.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Button (Bouton) -description : "De beaux boutons sur votre page." ---- - -Le shortcode *button* est simplement un bouton cliquable avec une icône optionnelle. - -``` -{{%/* button href="https://getgrav.org/" */%}}Téléchargez Grav{{%/* /button */%}} -{{%/* button href="https://getgrav.org/" icon="fa fa-download" */%}}Téléchargez Grav avec icône{{%/* /button */%}} -{{%/* button href="https://getgrav.org/" icon="fa fa-download" icon-position="right" */%}}Téléchargez Grav avec icône à droite{{%/* /button */%}} -``` - -{{% button href="https://getgrav.org/" %}}Téléchargez Grav{{% /button %}} -{{% button href="https://getgrav.org/" icon="fa fa-download" %}}Téléchargez Grav avec icône{{% /button %}} -{{% button href="https://getgrav.org/" icon="fa fa-download" icon-position="right" %}}Téléchargez Grav avec icône à droite{{% /button %}} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/_index.en.md deleted file mode 100644 index 5d6139b..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/_index.en.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title : Children -description : List the child pages of a page ---- - -Use the children shortcode to list the child pages of a page and the further descendants (children's children). By default, the shortcode displays links to the child pages. - -## Usage - -| Parameter | Default | Description | -|:--|:--|:--| -| page | _current_ | Specify the page name (section name) to display children for | -| style | "li" | Choose the style used to display descendants. It could be any HTML tag name | -| showhidden | "false" | When true, child pages hidden from the menu will be displayed | -| description | "false" | Allows you to include a short text under each page in the list.
when no description exists for the page, children shortcode takes the first 70 words of your content. [read more info about summaries on gohugo.io](https://gohugo.io/content/summaries/) | -| depth | 1 | Enter a number to specify the depth of descendants to display. For example, if the value is 2, the shortcode will display 2 levels of child pages.
**Tips:** set 999 to get all descendants| -| sort | none | Sort Children By
  • Weight - to sort on menu order
  • Name - to sort alphabetically on menu label
  • Identifier - to sort alphabetically on identifier set in frontmatter
  • URL - URL
  • | - -## Demo - - {{%/* children */%}} - -{{% children %}} - - {{%/* children description="true" */%}} - -{{%children description="true" %}} - - {{%/* children depth="3" showhidden="true" */%}} - -{{% children depth="3" showhidden="true" %}} - - {{%/* children style="h2" depth="3" description="true" */%}} - -{{% children style="h2" depth="3" description="true" %}} - - {{%/* children style="div" depth="999" */%}} - -{{% children style="div" depth="999" %}} - - - - - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/_index.fr.md deleted file mode 100644 index 672c5ad..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/_index.fr.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title : Children (Pages filles) -description : Liste les pages filles de la page ---- - -Utilisez le shortcode *children* pour lister les pages filles de la page et tous ses déscendants (pages filles de pages filles). Par défaut, le shortcode affiche des liens vers les pages filles. - -## Utilisation - -| Paramètre | Défaut | Description | -|:--|:--|:--| -| page | _current_ | Spécifie le nom de la page (nom de la section) à afficher | -| style | "li" | Choisi le style à utiliser pour afficher les descendants. Cela peut être n'importe quel balise HTML | -| showhidden | "false" | Quand *true*, pages filles cachées dans le menu seront affichées quand même | -| description | "false" | Permet d'inclure le texte de la description de la page sous chaque entré de la liste.
    quand aucune description existe pour la page, le shortcode prend les 70 premiers mots du contenu. [plus d'infos sur gohugo.io](https://gohugo.io/content/summaries/) | -| depth | 1 | Nombre de descendants à afficher. Par exemple, si la valeur est 2, le shortcode va afficher 2 niveaux de pages filels.
    **Astuce:** Utilisez 999 pour avoir tous les descendants| -| sort | | Tri les pages filles par
  • Weight - Poids
  • Name - Nom
  • Identifier - Trier alphabétiquement par identifiant configuré dans le front matter
  • URL - URL
  • | - -## Démo - - {{%/* children */%}} - -{{% children %}} - - {{%/* children description="true" */%}} - -{{%children description="true" %}} - - {{%/* children depth="3" showhidden="true" */%}} - -{{% children depth="3" showhidden="true" %}} - - {{%/* children style="h2" depth="3" description="true" */%}} - -{{% children style="h2" depth="3" description="true" %}} - - {{%/* children style="div" depth="999" */%}} - -{{% children style="div" depth="999" %}} - - - - - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/_index.en.md deleted file mode 100644 index d0c5179..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/_index.en.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "page 1" -description = "This is a demo child page" -+++ - -This is a demo child page \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/_index.fr.md deleted file mode 100644 index 7737f50..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/_index.fr.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "page 1" -description = "Ceci est une page test" -+++ - -Ceci est une page de demo \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.en.md deleted file mode 100644 index a4982f9..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.en.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "page 1-1" -description = "This is a demo child page" -+++ - -This is a demo child page \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.fr.md deleted file mode 100644 index e39cb58..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.fr.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "page 1-1" -description = "Ceci est une page test" -+++ - -Ceci est une page de demo \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.en.md deleted file mode 100644 index 5ce56f4..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.en.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "page 1-1-1" -description = "This is a demo child page" -+++ - -This is a demo child page \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.fr.md deleted file mode 100644 index 31d2cd1..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.fr.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "page 1-1-1" -description = "Ceci est une page test" -+++ - -Ceci est une page de demo \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.en.md deleted file mode 100644 index d5d9ab2..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.en.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "page 1-1-1-1" -description = "This is a demo child page" -+++ - -This is a demo child page \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.fr.md deleted file mode 100644 index 3b0f7f0..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.fr.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "page 1-1-1-1" -description = "Ceci est une page test" -+++ - -Ceci est une page de demo \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.en.md deleted file mode 100644 index 883b5b2..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.en.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "page 1-1-1-1-1" -description = "This is a demo child page" -+++ - -This is a demo child page \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.fr.md deleted file mode 100644 index 5a19617..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.fr.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "page 1-1-1-1-1" -description = "Ceci est une page test" -+++ - -Ceci est une page de demo \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/_index.en.md deleted file mode 100644 index a96140c..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/_index.en.md +++ /dev/null @@ -1,11 +0,0 @@ -+++ -title = "page 2" -description = "" -+++ - -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod - tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, - quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse - cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non - proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/_index.fr.md deleted file mode 100644 index a96140c..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/_index.fr.md +++ /dev/null @@ -1,11 +0,0 @@ -+++ -title = "page 2" -description = "" -+++ - -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod - tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, - quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse - cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non - proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/test3.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/test3.en.md deleted file mode 100644 index f603d4c..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/test3.en.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "page test 3" -description = "This is a page test" -+++ - -This is a test 3 demo child page \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/test3.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/test3.fr.md deleted file mode 100644 index 6d649e8..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-2/test3.fr.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "page test 3" -description = "Ceci est une page test" -+++ - -Ceci est une page de demo test 3 \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-3/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-3/_index.en.md deleted file mode 100644 index f36f861..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-3/_index.en.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "page 3" -description = "This is a demo child page" -+++ - -This is a demo child page, not displayed in the menu \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-3/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-3/_index.fr.md deleted file mode 100644 index 1501cc8..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-3/_index.fr.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "page 3" -description = "Ceci est une page test" -+++ - -Ceci est une page de demo \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-4/_index.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-4/_index.en.md deleted file mode 100644 index b9f042d..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-4/_index.en.md +++ /dev/null @@ -1,7 +0,0 @@ -+++ -title = "page 4" -description = "This is a demo child page" -hidden = true -+++ - -This is a demo child page, not displayed in the menu \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-4/_index.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-4/_index.fr.md deleted file mode 100644 index 6735e50..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/children-4/_index.fr.md +++ /dev/null @@ -1,7 +0,0 @@ -+++ -title = "page 4" -description = "Ceci est une page test" -hidden = true -+++ - -Ceci est une page de demo \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/test.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/test.en.md deleted file mode 100644 index 045f0a1..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/test.en.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "page test" -description = "This is a page test" -+++ - -This is a test demo child page \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/test.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/test.fr.md deleted file mode 100644 index dd6cc3c..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/children/test.fr.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "page test" -description = "Ceci est une page test" -+++ - -Ceci est une page de demo \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/expand.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/expand.en.md deleted file mode 100644 index dff1906..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/expand.en.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title : Expand -description : "Displays an expandable/collapsible section of text on your page" ---- - -The Expand shortcode displays an expandable/collapsible section of text on your page. -Here is an example - -{{%expand%}} -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -{{%/expand%}} - - -## Usage - - -this shortcode takes exactly one optional parameter to define the text that appears next to the expand/collapse icon. (default is "Expand me...") - - {{%/*expand "Is this learn theme rocks ?" */%}}Yes !.{{%/* /expand*/%}} - -{{%expand "Is this learn theme rocks ?" %}}Yes !{{% /expand%}} - -# Demo - - {{%/*expand*/%}} - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod - tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, - quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse - cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non - proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - {{%/* /expand*/%}} - - -{{%expand%}}Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{{% /expand%}} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/expand.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/expand.fr.md deleted file mode 100644 index efb86a3..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/expand.fr.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title : Expand -description : "Affiche une section de texte qui se plie et se déplie" ---- - -Le shortcode *Expand* affiche une section de texte qui se plie et se déplie. -Ci-dessous un exemple. - -{{%expand%}} -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -{{%/expand%}} - - -## Utilisation - - -Ce shortcode prends exactement un paramètre optionel pour définir le texte à côté de l'icone. (valeur par défaut est "Déroulez-moi...") - - {{%/*expand "Est-ce que ce thème envoie du pâté ?" */%}}Oui !.{{%/* /expand*/%}} - -{{%expand "Est-ce que ce thème envoie du pâté ?" %}}Oui !{{% /expand%}} - -# Demo - - {{%/*expand*/%}} - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod - tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, - quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse - cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non - proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - {{%/* /expand*/%}} - - -{{%expand%}}Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{{% /expand%}} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/mermaid.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/mermaid.en.md deleted file mode 100644 index 8963aed..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/mermaid.en.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -title : "Mermaid" -description : "Generation of diagram and flowchart from text in a similar manner as markdown" ---- - -[Mermaid](https://mermaidjs.github.io/) is a library helping you to generate diagram and flowcharts from text, in a similar manner as Markdown. - -Just insert your mermaid code in the `mermaid` shortcode and that's it. - -## Flowchart example - {{}} - graph LR; - A[Hard edge] -->|Link text| B(Round edge) - B --> C{Decision} - C -->|One| D[Result one] - C -->|Two| E[Result two] - {{}} - -renders as - -{{}} -graph LR; - A[Hard edge] -->|Link text| B(Round edge) - B --> C{Decision} - C -->|One| D[Result one] - C -->|Two| E[Result two] -{{< /mermaid >}} - -## Sequence example - - {{}} - sequenceDiagram - participant Alice - participant Bob - Alice->>John: Hello John, how are you? - loop Healthcheck - John->John: Fight against hypochondria - end - Note right of John: Rational thoughts
    prevail... - John-->Alice: Great! - John->Bob: How about you? - Bob-->John: Jolly good! - {{}} - -renders as - -{{}} -sequenceDiagram - participant Alice - participant Bob - Alice->>John: Hello John, how are you? - loop Healthcheck - John->John: Fight against hypochondria - end - Note right of John: Rational thoughts
    prevail... - John-->Alice: Great! - John->Bob: How about you? - Bob-->John: Jolly good! -{{< /mermaid >}} - -## GANTT Example - - {{}} - gantt - dateFormat YYYY-MM-DD - title Adding GANTT diagram functionality to mermaid - section A section - Completed task :done, des1, 2014-01-06,2014-01-08 - Active task :active, des2, 2014-01-09, 3d - Future task : des3, after des2, 5d - Future task2 : des4, after des3, 5d - section Critical tasks - Completed task in the critical line :crit, done, 2014-01-06,24h - Implement parser and jison :crit, done, after des1, 2d - Create tests for parser :crit, active, 3d - Future task in critical line :crit, 5d - Create tests for renderer :2d - Add to mermaid :1d - {{}} - - -render as - -{{}} -gantt - dateFormat YYYY-MM-DD - title Adding GANTT diagram functionality to mermaid - section A section - Completed task :done, des1, 2014-01-06,2014-01-08 - Active task :active, des2, 2014-01-09, 3d - Future task : des3, after des2, 5d - Future task2 : des4, after des3, 5d - section Critical tasks - Completed task in the critical line :crit, done, 2014-01-06,24h - Implement parser and jison :crit, done, after des1, 2d - Create tests for parser :crit, active, 3d - Future task in critical line :crit, 5d - Create tests for renderer :2d - Add to mermaid :1d -{{}} - - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/mermaid.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/mermaid.fr.md deleted file mode 100644 index ac66d84..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/mermaid.fr.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -title : "Mermaid" -description : "Génération de diagrammes à partir de texte, dans le même style que Markdown" ---- - -[Mermaid](https://mermaidjs.github.io/) est une bibliothèque Javascript qui permet de générer des diagrammes (séquence, état, gantt, etc.) à partir de texte, dans le même style que Markdown. - -Insérer votre code Mermaid dans un shortcode `mermaid` et c'est tout. - -## Flowchart example - {{}} - graph LR; - A[Bords droits] -->|Lien texte| B(Bords arondis) - B --> C{Décision} - C -->|Un| D[Résultat un] - C -->|Deux| E[Résultat deux] - {{}} - -renders as - -{{}} -graph LR; - A[Bords droits] -->|Lien texte| B(Bords arondis) - B --> C{Décision} - C -->|Un| D[Résultat un] - C -->|Deux| E[Résultat deux] -{{< /mermaid >}} - -## Sequence example - - {{}} - sequenceDiagram - participant Alice - participant Bob - Alice->>John: Salut John, comment vas-tu? - loop Vérification - John->John: Se bat contre l'hyponcodrie. - end - Note right of John: Les pensées rationnelles
    prédominent... - John-->Alice: Super! - John->Bob: Et toi? - Bob-->John: Au top! - {{}} - -renders as - -{{}} -sequenceDiagram - participant Alice - participant Bob - Alice->>John: Salut John, comment vas-tu? - loop Vérification - John->John: Se bat contre l'hyponcodrie. - end - Note right of John: Les pensées rationnelles
    prédominent... - John-->Alice: Super! - John->Bob: Et toi? - Bob-->John: Au top! -{{< /mermaid >}} - -## GANTT Example - - {{}} - gantt - dateFormat YYYY-MM-DD - title Ajout de la fonctionnalité de GANTT à Mermaid - section Une section - Tâche complétée :done, des1, 2014-01-06,2014-01-08 - Tâche en cours :active, des2, 2014-01-09, 3d - Future tâche : des3, after des2, 5d - Future tâche 2 : des4, after des3, 5d - section Tâches critiques - Tâche complétée dans le chemin critique :crit, done, 2014-01-06,24h - Implémenter le parser et jison :crit, done, after des1, 2d - Créer des tests pour le parser :crit, active, 3d - Future tâche dans le chemin critique :crit, 5d - Créer des tests pour le renderer :2d - Ajout à Mermaid :1d - {{}} - - -render as - -{{}} -gantt - dateFormat YYYY-MM-DD - title Ajout de la fonctionnalité de GANTT à Mermaid - section Une section - Tâche complétée :done, des1, 2014-01-06,2014-01-08 - Tâche en cours :active, des2, 2014-01-09, 3d - Future tâche : des3, after des2, 5d - Future tâche 2 : des4, after des3, 5d - section Tâches critiques - Tâche complétée dans le chemin critique :crit, done, 2014-01-06,24h - Implémenter le parser et jison :crit, done, after des1, 2d - Créer des tests pour le parser :crit, active, 3d - Future tâche dans le chemin critique :crit, 5d - Créer des tests pour le renderer :2d - Ajout à Mermaid :1d -{{}} - - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/notice.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/notice.en.md deleted file mode 100644 index df346c1..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/notice.en.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: Notice -description : "Disclaimers to help you structure your page" ---- - -The notice shortcode shows 4 types of disclaimers to help you structure your page. - -### Note - -``` -{{%/* notice note */%}} -A notice disclaimer -{{%/* /notice */%}} -``` - -renders as - -{{% notice note %}} -A notice disclaimer -{{% /notice %}} - -### Info - -``` -{{%/* notice info */%}} -An information disclaimer -{{%/* /notice */%}} -``` - -renders as - -{{% notice info %}} -An information disclaimer -{{% /notice %}} - -### Tip - -``` -{{%/* notice tip */%}} -A tip disclaimer -{{%/* /notice */%}} -``` - -renders as - -{{% notice tip %}} -A tip disclaimer -{{% /notice %}} - -### Warning - -``` -{{%/* notice warning */%}} -An warning disclaimer -{{%/* /notice */%}} -``` - -renders as - -{{% notice warning %}} -A warning disclaimer -{{% /notice %}} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/notice.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/notice.fr.md deleted file mode 100644 index 91e4d70..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/shortcodes/notice.fr.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: Notice -description : "Message pour vous aider à structurer votre contenu" ---- - -Le shortcode *Notice* permet d'afficher 4 types de message pour vous aider à structurer votre contenu. - -### Note - -``` -{{%/* notice note */%}} -Une notice de type *note* -{{%/* /notice */%}} -``` - -s'affiche comme - -{{% notice note %}} -Une notice de type *note* -{{% /notice %}} - -### Info - -``` -{{%/* notice info */%}} -Une notice de type *info* -{{%/* /notice */%}} -``` - -s'affiche comme - -{{% notice info %}} -Une notice de type *info* -{{% /notice %}} - -### Tip - -``` -{{%/* notice tip */%}} -Une notice de type *tip* -{{%/* /notice */%}} -``` - -s'affiche comme - -{{% notice tip %}} -Une notice de type *tip* -{{% /notice %}} - -### Warning - -``` -{{%/* notice warning */%}} -Une notice de type *warning* -{{%/* /notice */%}} -``` - -s'affiche comme - -{{% notice warning %}} -Une notice de type *warning* -{{% /notice %}} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/showcase.en.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/showcase.en.md deleted file mode 100644 index b6d5e0a..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/showcase.en.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Showcase -disableToc: true ---- - -#### [TAT](https://ovh.github.io/tat/overview/) by OVH -![TAT image](/images/showcase/tat.png?width=50%) - - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/showcase.fr.md b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/showcase.fr.md deleted file mode 100644 index 192babd..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/content/showcase.fr.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Vitrine -disableToc: true -slug: vitrine ---- - -#### [TAT](https://ovh.github.io/tat/overview/) par OVH -![TAT image](/images/showcase/tat.png?width=50%) - - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/layouts/partials/logo.html b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/layouts/partials/logo.html deleted file mode 100644 index a004a9a..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/layouts/partials/logo.html +++ /dev/null @@ -1,39 +0,0 @@ - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/layouts/partials/menu-footer.html b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/layouts/partials/menu-footer.html deleted file mode 100644 index 67f786e..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/layouts/partials/menu-footer.html +++ /dev/null @@ -1,14 +0,0 @@ -
    - - Download - - - Star - - - Fork - -

    Built with from Grav and Hugo

    -
    - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/layouts/shortcodes/ghcontributors.html b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/layouts/shortcodes/ghcontributors.html deleted file mode 100644 index 3e8a928..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/layouts/shortcodes/ghcontributors.html +++ /dev/null @@ -1,31 +0,0 @@ - -
    - {{ $url := .Get 0 }} - {{ range getJSON $url }} -
    - - - {{.contributions}} commits -
    - {{ end }} -
    \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/css/theme-mine.css b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/css/theme-mine.css deleted file mode 100644 index 56bb3bf..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/css/theme-mine.css +++ /dev/null @@ -1,104 +0,0 @@ - -:root{ - - --MAIN-TEXT-color:#323232; /* Color of text by default */ - --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ - --MAIN-LINK-color:#599a3e; /* Color of links */ - --MAIN-LINK-HOVER-color:#3f6d2c; /* Color of hovered links */ - --MAIN-ANCHOR-color: #599a3e; /* color of anchors on titles */ - - --MENU-HEADER-BG-color:#74b559; /* Background color of menu header */ - --MENU-HEADER-BORDER-color:#9cd484; /*Color of menu header border */ - - --MENU-SEARCH-BG-color:#599a3e; /* Search field background color (by default borders + icons) */ - --MENU-SEARCH-BOX-color: #84c767; /* Override search field border color */ - --MENU-SEARCH-BOX-ICONS-color: #c7f7c4; /* Override search field icons color */ - - --MENU-SECTIONS-ACTIVE-BG-color:#1b211c; /* Background color of the active section and its childs */ - --MENU-SECTIONS-BG-color:#222723; /* Background color of other sections */ - --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ - --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ - --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ - --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ - - --MENU-VISITED-color: #599a3e; /* Color of 'page visited' icons in menu */ - --MENU-SECTION-HR-color: #18211c; /* Color of
    separator in menu */ - -} - -body { - color: var(--MAIN-TEXT-color) !important; -} - -textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { - border-color: none; - box-shadow: none; -} - -h2, h3, h4, h5 { - color: var(--MAIN-TITLES-TEXT-color) !important; -} - -a { - color: var(--MAIN-LINK-color); -} - -.anchor { - color: var(--MAIN-ANCHOR-color); -} - -a:hover { - color: var(--MAIN-LINK-HOVER-color); -} - -#sidebar ul li.visited > a .read-icon { - color: var(--MENU-VISITED-color); -} - -#body a.highlight:after { - display: block; - content: ""; - height: 1px; - width: 0%; - -webkit-transition: width 0.5s ease; - -moz-transition: width 0.5s ease; - -ms-transition: width 0.5s ease; - transition: width 0.5s ease; - background-color: var(--MAIN-HOVER-color); -} -#sidebar { - background-color: var(--MENU-SECTIONS-BG-color); -} -#sidebar #header-wrapper { - background: var(--MENU-HEADER-BG-color); - color: var(--MENU-SEARCH-BOX-color); - border-color: var(--MENU-HEADER-BORDER-color); -} -#sidebar .searchbox { - border-color: var(--MENU-SEARCH-BOX-color); - background: var(--MENU-SEARCH-BG-color); -} -#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { - background: var(--MENU-SECTIONS-ACTIVE-BG-color); -} -#sidebar .searchbox * { - color: var(--MENU-SEARCH-BOX-ICONS-color); -} - -#sidebar a { - color: var(--MENU-SECTIONS-LINK-color); -} - -#sidebar a:hover { - color: var(--MENU-SECTIONS-LINK-HOVER-color); -} - -#sidebar ul li.active > a { - background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); - color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; -} - -#sidebar hr { - border-color: var(--MENU-SECTION-HR-color); -} - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/fonts/monogramos-webfont.eot b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/fonts/monogramos-webfont.eot deleted file mode 100755 index 702d2cc..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/fonts/monogramos-webfont.eot and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/fonts/monogramos-webfont.svg b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/fonts/monogramos-webfont.svg deleted file mode 100755 index c5ac859..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/fonts/monogramos-webfont.svg +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/fonts/monogramos-webfont.ttf b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/fonts/monogramos-webfont.ttf deleted file mode 100755 index 4c4637b..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/fonts/monogramos-webfont.ttf and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/fonts/monogramos-webfont.woff b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/fonts/monogramos-webfont.woff deleted file mode 100755 index d95d5ca..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/fonts/monogramos-webfont.woff and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/fonts/monogramos-webfont.woff2 b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/fonts/monogramos-webfont.woff2 deleted file mode 100755 index 39074b2..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/fonts/monogramos-webfont.woff2 and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/images/showcase/tat.png b/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/images/showcase/tat.png deleted file mode 100644 index 8a44830..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/exampleSite/static/images/showcase/tat.png and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/i18n/en.toml b/vendor/github.com/magefile/mage/site/themes/learn/i18n/en.toml deleted file mode 100644 index 118345f..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/i18n/en.toml +++ /dev/null @@ -1,26 +0,0 @@ -[Search-placeholder] -other = "Search..." - -[Clear-History] -other = "Clear History" - -[Attachments-label] -other = "Attachments" - -[title-404] -other = "Error" - -[message-404] -other = "Woops. Looks like this page doesn't exist ¯\\_(ツ)_/¯." - -[Go-to-homepage] -other = "Go to homepage" - -[Edit-this-page] -other = "Edit this page" - -[Shortcuts-Title] -other = "More" - -[Expand-title] -other = "Expand me..." \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/i18n/fr.toml b/vendor/github.com/magefile/mage/site/themes/learn/i18n/fr.toml deleted file mode 100644 index 106f20d..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/i18n/fr.toml +++ /dev/null @@ -1,26 +0,0 @@ -[Search-placeholder] -other = "Rechercher..." - -[Clear-History] -other = "Supprimer l'historique" - -[Attachments-label] -other = "Pièces jointes" - -[title-404] -other = "Erreur" - -[message-404] -other = "Oups. On dirait que cette page n'existe pas ¯\\_(ツ)_/¯" - -[Go-to-homepage] -other = "Vers la page d'accueil" - -[Edit-this-page] -other = "Modifier la page" - -[Shortcuts-Title] -other = "Aller plus loin" - -[Expand-title] -other = "Déroulez-moi..." \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/images/screenshot.png b/vendor/github.com/magefile/mage/site/themes/learn/images/screenshot.png deleted file mode 100644 index 85966a2..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/images/screenshot.png and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/images/tn.png b/vendor/github.com/magefile/mage/site/themes/learn/images/tn.png deleted file mode 100644 index c969306..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/images/tn.png and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/404.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/404.html deleted file mode 100644 index 1fc6265..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/404.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - {{ partial "meta.html" . }} {{ partial "favicon.html" . }} {{ .Scratch.Add "title" "" }}{{ if eq .Site.Data.titles .Title }}{{ .Scratch.Set "title" (index .Site.Data.titles .Title).title }}{{ else }}{{ .Scratch.Set "title" .Title}}{{end}} - {{ .Scratch.Get "title" }} - - {{ $assetBusting := not .Site.Params.disableAssetsBusting }} - - - - - - - - - {{with .Site.Params.themeVariant}} - - {{end}} - -{{ partial "custom-header.html" . }} - - - - - - -
    -
    -
    -
    -

    {{T "title-404"}}

    -

    -

    -

    {{T "message-404"}}

    -

    -

    {{T "Go-to-homepage"}}

    -

    -
    -
    - -
    - - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/_default/list.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/_default/list.html deleted file mode 100644 index d0fc92f..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/_default/list.html +++ /dev/null @@ -1,12 +0,0 @@ -{{ partial "header.html" . }} - -{{ .Content }} - -
    - {{with .Params.LastModifierDisplayName}} - {{ . }} {{with $.Date}} {{ .Format "02/01/2006" }}{{end}} - - {{end}} -
    - -{{ partial "footer.html" . }} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/_default/single.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/_default/single.html deleted file mode 100644 index 0a76d86..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/_default/single.html +++ /dev/null @@ -1,13 +0,0 @@ -{{ partial "header.html" . }} - -{{ .Content }} - -
    - {{with .Params.LastModifierDisplayName}} - {{ . }} {{with $.Date}} {{ .Format "02/01/2006" }}{{end}} - - {{end}} -
    - - -{{ partial "footer.html" . }} diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/index.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/index.html deleted file mode 100644 index ca5e9e9..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/index.html +++ /dev/null @@ -1,31 +0,0 @@ -{{ partial "header.html" . }} - - navigation - - -{{if .Site.Home.Content }} -{{.Site.Home.Content}} -{{else}} - {{if eq .Site.Language.Lang "fr"}} -

    Personaliser la page d'accueil

    -

    - Le site fonctionne. Ne pas oublier de personaliser cette page avec votre propre contenu. 2 manières de faire : -

    -
      -
    • 1. Créer un fichier _index.md dans le dossier content et le remplir de Markdown
    • -
    • 2. Créer un fichier index.html dans le dossier static et le remplir de code HTML
    • -
    • 2. Configurer le serveur http pour rediriger automatiquement la homepage vers la page de votre choix dans le site
    • -
    - {{else}} -

    Customize your own home page

    -

    - The site is working. Don't forget to customize this homepage with your own. You typically have 2 choices : -

    -
      -
    • 1. Create an _index.md document in content folder and fill it with Markdown content
    • -
    • 2. Create an index.html file in the static folder and fill the file with HTML content
    • -
    • 3. Configure your server to automatically redirect home page to one your documentation page
    • -
    - {{end}} -{{ end }} -{{ partial "footer.html" . }} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/index.json b/vendor/github.com/magefile/mage/site/themes/learn/layouts/index.json deleted file mode 100644 index 367f3b3..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/index.json +++ /dev/null @@ -1,12 +0,0 @@ -[{{ range $index, $page := .Site.Pages }} -{{- if ne $page.Type "json" -}} -{{- if and $index (gt $index 0) -}},{{- end }} -{ - "uri": "{{ $page.Permalink }}", - "title": "{{ htmlEscape $page.Title}}", - "tags": [{{ range $tindex, $tag := $page.Params.tags }}{{ if $tindex }}, {{ end }}"{{ $tag| htmlEscape }}"{{ end }}], - "description": "{{ htmlEscape .Description}}", - "content": {{$page.Plain | jsonify}} -} -{{- end -}} -{{- end -}}] \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/custom-footer.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/custom-footer.html deleted file mode 100644 index 9bb0f48..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/custom-footer.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/custom-header.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/custom-header.html deleted file mode 100644 index 294af29..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/custom-header.html +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/favicon.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/favicon.html deleted file mode 100644 index 41bbe85..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/favicon.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/footer.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/footer.html deleted file mode 100644 index fe5c834..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/footer.html +++ /dev/null @@ -1,74 +0,0 @@ - {{ if .Params.chapter }} - - {{ end }} - - - - - - - -
    -
    -
    - - - - - - - - - - - - - - - - {{ partial "custom-footer.html" . }} - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/header.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/header.html deleted file mode 100644 index 0d6bac6..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/header.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - {{ .Hugo.Generator }} - {{ partial "meta.html" . }} - {{ partial "favicon.html" . }} - {{ .Title }} :: {{ .Site.Title }} - - {{ $assetBusting := not .Site.Params.disableAssetsBusting }} - - - - - - - - - {{with .Site.Params.themeVariant}} - - {{end}} - - - - - {{ partial "custom-header.html" . }} - - - {{ partial "menu.html" . }} -
    -
    -
    - {{if not .IsHome}} -
    -
    - {{ if and (or .IsPage .IsSection) .Site.Params.editURL }} - {{ $File := .File }} - {{ $Site := .Site }} - {{with $File.Path }} - - {{ end }} - {{ end }} - {{$toc := (and (not .Params.disableToc) (not .Params.chapter))}} - - {{ if $toc }} - {{ partial "toc.html" . }} - {{ end }} -
    -
    - {{ end }} - - {{ if .Params.chapter }} -
    - {{ end }} -
    - {{if and (not .IsHome) (not .Params.chapter) }} -

    {{.Title}}

    - {{end}} - - {{define "breadcrumb"}} - {{$parent := .page.Parent }} - {{ if $parent }} - {{ $value := (printf "%s > %s" $parent.URL $parent.Title .value) }} - {{ template "breadcrumb" dict "page" $parent "value" $value }} - {{else}} - {{.value|safeHTML}} - {{end}} - {{end}} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/logo.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/logo.html deleted file mode 100644 index 1abf0b2..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/logo.html +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/menu-footer.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/menu-footer.html deleted file mode 100644 index 22f5af8..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/menu-footer.html +++ /dev/null @@ -1 +0,0 @@ -

    Built with from Grav and Hugo

    diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/menu.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/menu.html deleted file mode 100644 index 9780b83..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/menu.html +++ /dev/null @@ -1,150 +0,0 @@ - - - -{{ define "section-tree-nav" }} -{{ $showvisitedlinks := .showvisitedlinks }} -{{ $currentNode := .currentnode }} - {{with .sect}} - {{if .IsSection}} - {{safeHTML .Params.head}} -
  • - - {{safeHTML .Params.Pre}}{{.Title}}{{safeHTML .Params.Post}} - {{ if $showvisitedlinks}} - - {{ end }} - - {{ $numberOfPages := (add (len .Pages) (len .Sections)) }} - {{ if ne $numberOfPages 0 }} -
      - {{ .Scratch.Set "pages" .Pages }} - {{ if .Sections}} - {{ .Scratch.Set "pages" (.Pages | union .Sections) }} - {{end}} - {{ $pages := (.Scratch.Get "pages") }} - - {{if eq .Site.Params.ordersectionsby "title"}} - {{ range $pages.ByTitle }} - {{ if and .Params.hidden (not $.showhidden) }} - {{else}} - {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }} - {{end}} - {{ end }} - {{else}} - {{ range $pages.ByWeight }} - {{ if and .Params.hidden (not $.showhidden) }} - {{else}} - {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }} - {{end}} - {{ end }} - {{end}} -
    - {{ end }} -
  • - {{else}} - {{ if not .Params.Hidden }} -
  • - - {{safeHTML .Params.Pre}}{{.Title}}{{safeHTML .Params.Post}} - {{ if $showvisitedlinks}}{{end}} - -
  • - {{ end }} - {{end}} - {{ end }} -{{ end }} - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/meta.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/meta.html deleted file mode 100644 index 71d9634..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/meta.html +++ /dev/null @@ -1,2 +0,0 @@ - -{{ with .Site.Params.author }}{{ end }} diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/search.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/search.html deleted file mode 100644 index 180c322..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/search.html +++ /dev/null @@ -1,16 +0,0 @@ - -{{ $assetBusting := not .Site.Params.disableAssetsBusting }} - - - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/toc.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/toc.html deleted file mode 100644 index 6b69051..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/partials/toc.html +++ /dev/null @@ -1,5 +0,0 @@ -
    -
    -{{ .TableOfContents }} -
    -
    diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/attachments.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/attachments.html deleted file mode 100644 index 42780d0..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/attachments.html +++ /dev/null @@ -1,35 +0,0 @@ -
    - - {{if eq .Page.File.BaseFileName "index"}} - {{$.Scratch.Add "filesName" "files"}} - {{else}} - {{$.Scratch.Add "filesName" (printf "%s.files" .Page.File.BaseFileName)}} - {{end}} -
    - {{ range (readDir (printf "./content/%s%s" .Page.File.Dir ($.Scratch.Get "filesName")) ) }} - {{ $fileDir := replace $.Page.File.Dir "\\" "/" }} - {{if ($.Get "pattern")}} - {{if (findRE ($.Get "pattern") .Name)}} -
  • - - {{.Name}} - - ({{div .Size 1024 }} ko) -
  • - {{end}} - {{else}} -
  • - - {{.Name}} - - ({{div .Size 1024 }} ko) -
  • - {{end}} - {{end}} -
    - {{.Inner}} -
    - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/button.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/button.html deleted file mode 100644 index fdeaa19..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/button.html +++ /dev/null @@ -1,13 +0,0 @@ - - {{ $icon := .Get "icon" }} - {{ $iconposition := .Get "icon-position" }} - {{ if ($icon) }} - {{ if or (not ($iconposition)) (eq $iconposition "left") }} - - {{ end }} - {{ end }} - {{ .Inner }} - {{ if and ($icon) (eq $iconposition "right")}} - - {{ end }} - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/children.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/children.html deleted file mode 100644 index fe20839..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/children.html +++ /dev/null @@ -1,96 +0,0 @@ -{{ $showhidden := .Get "showhidden"}} -{{ $style := .Get "style" | default "li" }} -{{ $depth := .Get "depth" | default 1 }} -{{ $withDescription := .Get "description" | default false }} -{{ $sortTerm := .Get "sort" | default "Weight" }} - - -
      - {{ .Scratch.Set "pages" .Page.Pages }} - {{ if .Page.Sections}} - {{ .Scratch.Set "pages" (.Page.Pages | union .Page.Sections) }} - {{end}} - {{ $pages := (.Scratch.Get "pages") }} - - {{if eq $sortTerm "Weight"}} - {{template "childs" dict "menu" $pages.ByWeight "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} - {{else if eq $sortTerm "Name"}} - {{template "childs" dict "menu" $pages.ByTitle "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} - {{else if eq $sortTerm "PublishDate"}} - {{template "childs" dict "menu" $pages.ByPublishDate "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} - {{else if eq $sortTerm "Date"}} - {{template "childs" dict "menu" $pages.ByDate "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} - {{else if eq $sortTerm "Length"}} - {{template "childs" dict "menu" $pages.ByLength "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} - {{else}} - {{template "childs" dict "menu" $pages "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} - {{end}} -
    - -{{.Inner|safeHTML}} - -{{ define "childs" }} - {{ range .menu }} - {{ if and .Params.hidden (not $.showhidden) }} - {{else}} - - -{{if hasPrefix $.style "h"}} - {{$num := sub ( int (trim $.style "h") ) 1 }} - {{$numn := add $num $.count }} - -{{(printf "" $numn)|safeHTML}} -{{ .Title }} -{{(printf "" $numn)|safeHTML}} - -{{else}} -{{(printf "<%s>" $.style)|safeHTML}} -{{ .Title }} -{{(printf "" $.style)|safeHTML}} -{{end}} - - - - - - {{if $.description}} - {{if .Description}} -

    {{.Description}}

    - {{else}} -

    {{.Summary}}

    - {{end}} - {{end}} - - - - {{ if lt $.count $.depth}} -{{if eq $.style "li"}} -
      -{{end}} - {{ .Scratch.Set "pages" .Pages }} - {{ if .Sections}} - {{ .Scratch.Set "pages" (.Pages | union .Sections) }} - {{end}} - {{ $pages := (.Scratch.Get "pages") }} - - {{if eq $.sortTerm "Weight"}} - {{template "childs" dict "menu" $pages.ByWeight "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} - {{else if eq $.sortTerm "Name"}} - {{template "childs" dict "menu" $pages.ByTitle "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} - {{else if eq $.sortTerm "PublishDate"}} - {{template "childs" dict "menu" $pages.ByPublishDate "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} - {{else if eq $.sortTerm "Date"}} - {{template "childs" dict "menu" $pages.ByDate "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} - {{else if eq $.sortTerm "Length"}} - {{template "childs" dict "menu" $pages.ByLength "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} - {{else}} - {{template "childs" dict "menu" $pages "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} - {{end}} -{{if eq $.style "li"}} -
    -{{end}} - {{end}} - - {{end}} - {{end}} -{{end}} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/expand.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/expand.html deleted file mode 100644 index d976ad8..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/expand.html +++ /dev/null @@ -1,16 +0,0 @@ -
    -
    - - - {{$expandMessage := T "Expand-title"}} - {{ if .IsNamedParams }} - {{.Get "default" | default $expandMessage}} - {{else}} - {{.Get 0 | default $expandMessage}} - {{end}} - -
    - -
    \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/mermaid.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/mermaid.html deleted file mode 100644 index 3227064..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/mermaid.html +++ /dev/null @@ -1 +0,0 @@ -
    {{ safeHTML .Inner }}
    \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/notice.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/notice.html deleted file mode 100644 index 936f68a..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/notice.html +++ /dev/null @@ -1 +0,0 @@ -
    {{ .Inner }}
    diff --git a/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/relref.html b/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/relref.html deleted file mode 100644 index 5cb8116..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/layouts/shortcodes/relref.html +++ /dev/null @@ -1,12 +0,0 @@ -{{- if in (.Get 0) "/_index.md" -}} - {{- $path := (trim (.Get 0) "_index.md") -}} - {{- with .Site.GetPage "section" (trim $path "/") -}} - {{- .URL -}} - {{- end -}} -{{- else -}} - {{- with .Site.GetPage "section" (.Get 0) }} - {{- .URL -}} - {{- else -}} - {{- .Get 0 | relref .Page -}} - {{- end -}} -{{- end -}} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/css/featherlight.min.css b/vendor/github.com/magefile/mage/site/themes/learn/static/css/featherlight.min.css deleted file mode 100644 index f225bec..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/css/featherlight.min.css +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Featherlight - ultra slim jQuery lightbox - * Version 1.2.3 - http://noelboss.github.io/featherlight/ - * - * Copyright 2015, Noël Raoul Bossart (http://www.noelboss.com) - * MIT Licensed. -**/ -@media all{.featherlight{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483647;text-align:center;white-space:nowrap;cursor:pointer;background:#333;background:rgba(0,0,0,0)}.featherlight:last-of-type{background:rgba(0,0,0,.8)}.featherlight:before{content:'';display:inline-block;height:100%;vertical-align:middle;margin-right:-.25em}.featherlight .featherlight-content{position:relative;text-align:left;vertical-align:middle;display:inline-block;overflow:auto;padding:25px 25px 0;border-bottom:25px solid transparent;min-width:30%;margin-left:5%;margin-right:5%;max-height:95%;background:#fff;cursor:auto;white-space:normal}.featherlight .featherlight-inner{display:block}.featherlight .featherlight-close-icon{position:absolute;z-index:9999;top:0;right:0;line-height:25px;width:25px;cursor:pointer;text-align:center;font:Arial,sans-serif;background:#fff;background:rgba(255,255,255,.3);color:#000}.featherlight .featherlight-image{width:100%}.featherlight-iframe .featherlight-content{border-bottom:0;padding:0}.featherlight iframe{border:0}}@media only screen and (max-width:1024px){.featherlight .featherlight-content{margin-left:10px;margin-right:10px;max-height:98%;padding:10px 10px 0;border-bottom:10px solid transparent}} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/css/font-awesome.min.css b/vendor/github.com/magefile/mage/site/themes/learn/static/css/font-awesome.min.css deleted file mode 100644 index 540440c..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/css/font-awesome.min.css +++ /dev/null @@ -1,4 +0,0 @@ -/*! - * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/css/horsey.css b/vendor/github.com/magefile/mage/site/themes/learn/static/css/horsey.css deleted file mode 100644 index 358f72d..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/css/horsey.css +++ /dev/null @@ -1,35 +0,0 @@ -.sey-list { - display: none; - position: absolute; - padding: 0; - margin: 0; - list-style-type: none; - box-shadow: 1px 2px 6px; - background-color: #fff; - color: #333; - transition: left 0.1s ease-in-out; - max-height: 70vh; - overflow: auto; - width: 265px; -} -.sey-show { - display: block; -} -.sey-hide { - display: none; -} -.sey-item { - cursor: pointer; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - padding: 7px; -} -.sey-item:hover { - background-color: #444; - color: #fff; -} -.sey-selected { - background-color: #333; - color: #fff; -} diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/css/hugo-theme.css b/vendor/github.com/magefile/mage/site/themes/learn/static/css/hugo-theme.css deleted file mode 100644 index 2b46685..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/css/hugo-theme.css +++ /dev/null @@ -1,252 +0,0 @@ -/* Insert here special css for hugo theme, on top of any other imported css */ - - -/* Table of contents */ - -.progress ul { - list-style: none; - margin: 0; - padding: 0 5px; -} - -#TableOfContents { - font-size: 13px !important; - max-height: 85vh; - overflow: auto; - padding: 15px !important; -} - - -#TableOfContents > ul > li > ul > li > ul li { - margin-right: 8px; -} - -#TableOfContents > ul > li > a { - font-weight: bold; padding: 0 18px; margin: 0 2px; -} - -#TableOfContents > ul > li > ul > li > a { - font-weight: bold; -} - -#TableOfContents > ul > li > ul > li > ul > li > ul > li > ul > li { - display: none; -} - -body { - font-size: 16px !important; - color: #323232 !important; -} - -#body a.highlight, #body a.highlight:hover, #body a.highlight:focus { - text-decoration: none; - outline: none; - outline: 0; -} -#body a.highlight { - line-height: 1.1; - display: inline-block; -} -#body a.highlight:after { - display: block; - content: ""; - height: 1px; - width: 0%; - background-color: #0082a7; /*#CE3B2F*/ - -webkit-transition: width 0.5s ease; - -moz-transition: width 0.5s ease; - -ms-transition: width 0.5s ease; - transition: width 0.5s ease; -} -#body a.highlight:hover:after, #body a.highlight:focus:after { - width: 100%; -} -.progress { - position:absolute; - background-color: rgba(246, 246, 246, 0.97); - width: auto; - border: thin solid #ECECEC; - display:none; - z-index:200; -} - -#toc-menu { - border-right: thin solid #DAD8D8 !important; - padding-right: 1rem !important; - margin-right: 0.5rem !important; -} - -#sidebar-toggle-span { - border-right: thin solid #DAD8D8 !important; - padding-right: 0.5rem !important; - margin-right: 1rem !important; -} - -#top-bar { - z-index: 1000; -} - -#top-bar.is_stuck { - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1); -} - -.btn { - display: inline-block !important; - padding: 6px 12px !important; - margin-bottom: 0 !important; - font-size: 14px !important; - font-weight: normal !important; - line-height: 1.42857143 !important; - text-align: center !important; - white-space: nowrap !important; - vertical-align: middle !important; - -ms-touch-action: manipulation !important; - touch-action: manipulation !important; - cursor: pointer !important; - -webkit-user-select: none !important; - -moz-user-select: none !important; - -ms-user-select: none !important; - user-select: none !important; - background-image: none !important; - border: 1px solid transparent !important; - border-radius: 4px !important; - -webkit-transition: all 0.15s !important; - -moz-transition: all 0.15s !important; - transition: all 0.15s !important; -} -.btn:focus { - /*outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px;*/ - outline: none !important; -} -.btn:hover, -.btn:focus { - color: #2b2b2b !important; - text-decoration: none !important; -} - -.btn-default { - color: #333 !important; - background-color: #fff !important; - border-color: #ccc !important; -} -.btn-default:hover, -.btn-default:focus, -.btn-default:active { - color: #fff !important; - background-color: #9e9e9e !important; - border-color: #9e9e9e !important; -} -.btn-default:active { - background-image: none !important; -} - -/* anchors */ -.anchor { - color: #00bdf3; - font-size: 0.5em; - cursor:pointer; - visibility:hidden; - margin-left: 0.5em; - position: absolute; - margin-top:0.1em; -} - -h2:hover .anchor, h3:hover .anchor, h4:hover .anchor, h5:hover .anchor, h6:hover .anchor { - visibility:visible; -} - -/* Redfines headers style */ - -h2, h3, h4, h5, h6 { - font-weight: 400; - line-height: 1.1; -} - -h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { - font-weight: inherit; -} - -h2 { - font-size: 2.5rem; - line-height: 110% !important; - margin: 2.5rem 0 1.5rem 0; -} - -h3 { - font-size: 2rem; - line-height: 110% !important; - margin: 2rem 0 1rem 0; -} - -h4 { - font-size: 1.5rem; - line-height: 110% !important; - margin: 1.5rem 0 0.75rem 0; -} - -h5 { - font-size: 1rem; - line-height: 110% !important; - margin: 1rem 0 0.2rem 0; -} - -h6 { - font-size: 0.5rem; - line-height: 110% !important; - margin: 0.5rem 0 0.2rem 0; -} - -p { - margin: 1rem 0; -} - -figcaption h4 { - font-weight: 300 !important; - opacity: .85; - font-size: 1em; - text-align: center; - margin-top: -1.5em; -} - -.select-style { - border: 0; - width: 150px; - border-radius: 0px; - overflow: hidden; - display: inline-flex; -} - -.select-style svg { - fill: #ccc; - width: 14px; - height: 14px; - pointer-events: none; - margin: auto; -} - -.select-style svg:hover { - fill: #e6e6e6; -} - -.select-style select { - padding: 0; - width: 130%; - border: none; - box-shadow: none; - background: transparent; - background-image: none; - -webkit-appearance: none; - margin: auto; - margin-left: 0px; - margin-right: -20px; -} - -.select-style select:focus { - outline: none; -} - -.select-style :hover { - cursor: pointer; -} \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/css/hybrid.css b/vendor/github.com/magefile/mage/site/themes/learn/static/css/hybrid.css deleted file mode 100644 index 29735a1..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/css/hybrid.css +++ /dev/null @@ -1,102 +0,0 @@ -/* - -vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid) - -*/ - -/*background color*/ -.hljs { - display: block; - overflow-x: auto; - padding: 0.5em; - background: #1d1f21; -} - -/*selection color*/ -.hljs::selection, -.hljs span::selection { - background: #373b41; -} - -.hljs::-moz-selection, -.hljs span::-moz-selection { - background: #373b41; -} - -/*foreground color*/ -.hljs { - color: #c5c8c6; -} - -/*color: fg_yellow*/ -.hljs-title, -.hljs-name { - color: #f0c674; -} - -/*color: fg_comment*/ -.hljs-comment, -.hljs-meta, -.hljs-meta .hljs-keyword { - color: #707880; -} - -/*color: fg_red*/ -.hljs-number, -.hljs-symbol, -.hljs-literal, -.hljs-deletion, -.hljs-link { - color: #cc6666 -} - -/*color: fg_green*/ -.hljs-string, -.hljs-doctag, -.hljs-addition, -.hljs-regexp, -.hljs-selector-attr, -.hljs-selector-pseudo { - color: #b5bd68; -} - -/*color: fg_purple*/ -.hljs-attribute, -.hljs-code, -.hljs-selector-id { - color: #b294bb; -} - -/*color: fg_blue*/ -.hljs-keyword, -.hljs-selector-tag, -.hljs-bullet, -.hljs-tag { - color: #81a2be; -} - -/*color: fg_aqua*/ -.hljs-subst, -.hljs-variable, -.hljs-template-tag, -.hljs-template-variable { - color: #8abeb7; -} - -/*color: fg_orange*/ -.hljs-type, -.hljs-built_in, -.hljs-builtin-name, -.hljs-quote, -.hljs-section, -.hljs-selector-class { - color: #de935f; -} - -.hljs-emphasis { - font-style: italic; -} - -.hljs-strong { - font-weight: bold; -} diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/css/nucleus.css b/vendor/github.com/magefile/mage/site/themes/learn/static/css/nucleus.css deleted file mode 100644 index ed2c0a3..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/css/nucleus.css +++ /dev/null @@ -1,617 +0,0 @@ -*, *::before, *::after { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; } - -@-webkit-viewport { - width: device-width; } -@-moz-viewport { - width: device-width; } -@-ms-viewport { - width: device-width; } -@-o-viewport { - width: device-width; } -@viewport { - width: device-width; } -html { - font-size: 100%; - -ms-text-size-adjust: 100%; - -webkit-text-size-adjust: 100%; } - -body { - margin: 0; } - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -nav, -section, -summary { - display: block; } - -audio, -canvas, -progress, -video { - display: inline-block; - vertical-align: baseline; } - -audio:not([controls]) { - display: none; - height: 0; } - -[hidden], -template { - display: none; } - -a { - background: transparent; - text-decoration: none; } - -a:active, -a:hover { - outline: 0; } - -abbr[title] { - border-bottom: 1px dotted; } - -b, -strong { - font-weight: bold; } - -dfn { - font-style: italic; } - -mark { - background: #FFFF27; - color: #333; } - -sub, -sup { - font-size: 0.8rem; - line-height: 0; - position: relative; - vertical-align: baseline; } - -sup { - top: -0.5em; } - -sub { - bottom: -0.25em; } - -img { - border: 0; - max-width: 100%; } - -svg:not(:root) { - overflow: hidden; } - -figure { - margin: 1em 40px; } - -hr { - height: 0; } - -pre { - overflow: auto; } - -button, -input, -optgroup, -select, -textarea { - color: inherit; - font: inherit; - margin: 0; } - -button { - overflow: visible; } - -button, -select { - text-transform: none; } - -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; - cursor: pointer; } - -button[disabled], -html input[disabled] { - cursor: default; } - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; } - -input { - line-height: normal; } - -input[type="checkbox"], -input[type="radio"] { - padding: 0; } - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; } - -input[type="search"] { - -webkit-appearance: textfield; } - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; } - -legend { - border: 0; - padding: 0; } - -textarea { - overflow: auto; } - -optgroup { - font-weight: bold; } - -table { - border-collapse: collapse; - border-spacing: 0; - table-layout: fixed; - width: 100%; } - -tr, td, th { - vertical-align: middle; } - -th, td { - padding: 0.425rem 0; } - -th { - text-align: left; } - -.container { - width: 75em; - margin: 0 auto; - padding: 0; } - @media only all and (min-width: 60em) and (max-width: 74.938em) { - .container { - width: 60em; } } - @media only all and (min-width: 48em) and (max-width: 59.938em) { - .container { - width: 48em; } } - @media only all and (min-width: 30.063em) and (max-width: 47.938em) { - .container { - width: 30em; } } - @media only all and (max-width: 30em) { - .container { - width: 100%; } } - -.grid { - display: -webkit-box; - display: -moz-box; - display: box; - display: -webkit-flex; - display: -moz-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-flow: row; - -moz-flex-flow: row; - flex-flow: row; - list-style: none; - margin: 0; - padding: 0; } - @media only all and (max-width: 47.938em) { - .grid { - -webkit-flex-flow: row wrap; - -moz-flex-flow: row wrap; - flex-flow: row wrap; } } - -.block { - -webkit-box-flex: 1; - -moz-box-flex: 1; - box-flex: 1; - -webkit-flex: 1; - -moz-flex: 1; - -ms-flex: 1; - flex: 1; - min-width: 0; - min-height: 0; } - @media only all and (max-width: 47.938em) { - .block { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 100%; - -moz-flex: 0 100%; - -ms-flex: 0 100%; - flex: 0 100%; } } - -.content { - margin: 0.625rem; - padding: 0.938rem; } - -@media only all and (max-width: 47.938em) { - body [class*="size-"] { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 100%; - -moz-flex: 0 100%; - -ms-flex: 0 100%; - flex: 0 100%; } } - -.size-1-2 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 50%; - -moz-flex: 0 50%; - -ms-flex: 0 50%; - flex: 0 50%; } - -.size-1-3 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 33.33333%; - -moz-flex: 0 33.33333%; - -ms-flex: 0 33.33333%; - flex: 0 33.33333%; } - -.size-1-4 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 25%; - -moz-flex: 0 25%; - -ms-flex: 0 25%; - flex: 0 25%; } - -.size-1-5 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 20%; - -moz-flex: 0 20%; - -ms-flex: 0 20%; - flex: 0 20%; } - -.size-1-6 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 16.66667%; - -moz-flex: 0 16.66667%; - -ms-flex: 0 16.66667%; - flex: 0 16.66667%; } - -.size-1-7 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 14.28571%; - -moz-flex: 0 14.28571%; - -ms-flex: 0 14.28571%; - flex: 0 14.28571%; } - -.size-1-8 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 12.5%; - -moz-flex: 0 12.5%; - -ms-flex: 0 12.5%; - flex: 0 12.5%; } - -.size-1-9 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 11.11111%; - -moz-flex: 0 11.11111%; - -ms-flex: 0 11.11111%; - flex: 0 11.11111%; } - -.size-1-10 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 10%; - -moz-flex: 0 10%; - -ms-flex: 0 10%; - flex: 0 10%; } - -.size-1-11 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 9.09091%; - -moz-flex: 0 9.09091%; - -ms-flex: 0 9.09091%; - flex: 0 9.09091%; } - -.size-1-12 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 8.33333%; - -moz-flex: 0 8.33333%; - -ms-flex: 0 8.33333%; - flex: 0 8.33333%; } - -@media only all and (min-width: 48em) and (max-width: 59.938em) { - .size-tablet-1-2 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 50%; - -moz-flex: 0 50%; - -ms-flex: 0 50%; - flex: 0 50%; } - - .size-tablet-1-3 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 33.33333%; - -moz-flex: 0 33.33333%; - -ms-flex: 0 33.33333%; - flex: 0 33.33333%; } - - .size-tablet-1-4 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 25%; - -moz-flex: 0 25%; - -ms-flex: 0 25%; - flex: 0 25%; } - - .size-tablet-1-5 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 20%; - -moz-flex: 0 20%; - -ms-flex: 0 20%; - flex: 0 20%; } - - .size-tablet-1-6 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 16.66667%; - -moz-flex: 0 16.66667%; - -ms-flex: 0 16.66667%; - flex: 0 16.66667%; } - - .size-tablet-1-7 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 14.28571%; - -moz-flex: 0 14.28571%; - -ms-flex: 0 14.28571%; - flex: 0 14.28571%; } - - .size-tablet-1-8 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 12.5%; - -moz-flex: 0 12.5%; - -ms-flex: 0 12.5%; - flex: 0 12.5%; } - - .size-tablet-1-9 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 11.11111%; - -moz-flex: 0 11.11111%; - -ms-flex: 0 11.11111%; - flex: 0 11.11111%; } - - .size-tablet-1-10 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 10%; - -moz-flex: 0 10%; - -ms-flex: 0 10%; - flex: 0 10%; } - - .size-tablet-1-11 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 9.09091%; - -moz-flex: 0 9.09091%; - -ms-flex: 0 9.09091%; - flex: 0 9.09091%; } - - .size-tablet-1-12 { - -webkit-box-flex: 0; - -moz-box-flex: 0; - box-flex: 0; - -webkit-flex: 0 8.33333%; - -moz-flex: 0 8.33333%; - -ms-flex: 0 8.33333%; - flex: 0 8.33333%; } } -@media only all and (max-width: 47.938em) { - @supports not (flex-wrap: wrap) { - .grid { - display: block; - -webkit-box-lines: inherit; - -moz-box-lines: inherit; - box-lines: inherit; - -webkit-flex-wrap: inherit; - -moz-flex-wrap: inherit; - -ms-flex-wrap: inherit; - flex-wrap: inherit; } - - .block { - display: block; - -webkit-box-flex: inherit; - -moz-box-flex: inherit; - box-flex: inherit; - -webkit-flex: inherit; - -moz-flex: inherit; - -ms-flex: inherit; - flex: inherit; } } } -.first-block { - -webkit-box-ordinal-group: 0; - -webkit-order: -1; - -ms-flex-order: -1; - order: -1; } - -.last-block { - -webkit-box-ordinal-group: 2; - -webkit-order: 1; - -ms-flex-order: 1; - order: 1; } - -.fixed-blocks { - -webkit-flex-flow: row wrap; - -moz-flex-flow: row wrap; - flex-flow: row wrap; } - .fixed-blocks .block { - -webkit-box-flex: inherit; - -moz-box-flex: inherit; - box-flex: inherit; - -webkit-flex: inherit; - -moz-flex: inherit; - -ms-flex: inherit; - flex: inherit; - width: 25%; } - @media only all and (min-width: 60em) and (max-width: 74.938em) { - .fixed-blocks .block { - width: 33.33333%; } } - @media only all and (min-width: 48em) and (max-width: 59.938em) { - .fixed-blocks .block { - width: 50%; } } - @media only all and (max-width: 47.938em) { - .fixed-blocks .block { - width: 100%; } } - -body { - font-size: 1.05rem; - line-height: 1.7; } - -h1, h2, h3, h4, h5, h6 { - margin: 0.85rem 0 1.7rem 0; - text-rendering: optimizeLegibility; } - -h1 { - font-size: 3.25rem; } - -h2 { - font-size: 2.55rem; } - -h3 { - font-size: 2.15rem; } - -h4 { - font-size: 1.8rem; } - -h5 { - font-size: 1.4rem; } - -h6 { - font-size: 0.9rem; } - -p { - margin: 1.7rem 0; } - -ul, ol { - margin-top: 1.7rem; - margin-bottom: 1.7rem; } - ul ul, ul ol, ol ul, ol ol { - margin-top: 0; - margin-bottom: 0; } - -blockquote { - margin: 1.7rem 0; - padding-left: 0.85rem; } - -cite { - display: block; - font-size: 0.925rem; } - cite:before { - content: "\2014 \0020"; } - -pre { - margin: 1.7rem 0; - padding: 0.938rem; } - -code { - vertical-align: bottom; } - -small { - font-size: 0.925rem; } - -hr { - border-left: none; - border-right: none; - border-top: none; - margin: 1.7rem 0; } - -fieldset { - border: 0; - padding: 0.938rem; - margin: 0 0 1.7rem 0; } - -input, -label, -select { - display: block; } - -label { - margin-bottom: 0.425rem; } - label.required:after { - content: "*"; } - label abbr { - display: none; } - -textarea, input[type="email"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="url"], input[type="color"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="month"], input[type="time"], input[type="week"], select[multiple=multiple] { - -webkit-transition: border-color; - -moz-transition: border-color; - transition: border-color; - border-radius: 0.1875rem; - margin-bottom: 0.85rem; - padding: 0.425rem 0.425rem; - width: 100%; } - textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { - outline: none; } - -textarea { - resize: vertical; } - -input[type="checkbox"], input[type="radio"] { - display: inline; - margin-right: 0.425rem; } - -input[type="file"] { - width: 100%; } - -select { - width: auto; - max-width: 100%; - margin-bottom: 1.7rem; } - -button, -input[type="submit"] { - cursor: pointer; - user-select: none; - vertical-align: middle; - white-space: nowrap; - border: inherit; } - -/*# sourceMappingURL=nucleus.css.map */ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/css/perfect-scrollbar.min.css b/vendor/github.com/magefile/mage/site/themes/learn/static/css/perfect-scrollbar.min.css deleted file mode 100644 index ebd2cb4..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/css/perfect-scrollbar.min.css +++ /dev/null @@ -1,2 +0,0 @@ -/* perfect-scrollbar v0.6.13 */ -.ps-container{-ms-touch-action:auto;touch-action:auto;overflow:hidden !important;-ms-overflow-style:none}@supports (-ms-overflow-style: none){.ps-container{overflow:auto !important}}@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none){.ps-container{overflow:auto !important}}.ps-container.ps-active-x>.ps-scrollbar-x-rail,.ps-container.ps-active-y>.ps-scrollbar-y-rail{display:block;background-color:transparent}.ps-container.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail{background-color:#eee;opacity:.9}.ps-container.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail>.ps-scrollbar-x{background-color:#999;height:11px}.ps-container.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail{background-color:#eee;opacity:.9}.ps-container.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail>.ps-scrollbar-y{background-color:#999;width:11px}.ps-container>.ps-scrollbar-x-rail{display:none;position:absolute;opacity:0;-webkit-transition:background-color .2s linear, opacity .2s linear;-o-transition:background-color .2s linear, opacity .2s linear;-moz-transition:background-color .2s linear, opacity .2s linear;transition:background-color .2s linear, opacity .2s linear;bottom:0px;height:15px}.ps-container>.ps-scrollbar-x-rail>.ps-scrollbar-x{position:absolute;background-color:#aaa;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;-o-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;-moz-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;bottom:2px;height:6px}.ps-container>.ps-scrollbar-x-rail:hover>.ps-scrollbar-x,.ps-container>.ps-scrollbar-x-rail:active>.ps-scrollbar-x{height:11px}.ps-container>.ps-scrollbar-y-rail{display:none;position:absolute;opacity:0;-webkit-transition:background-color .2s linear, opacity .2s linear;-o-transition:background-color .2s linear, opacity .2s linear;-moz-transition:background-color .2s linear, opacity .2s linear;transition:background-color .2s linear, opacity .2s linear;right:0;width:15px}.ps-container>.ps-scrollbar-y-rail>.ps-scrollbar-y{position:absolute;background-color:#aaa;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;-o-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;-moz-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;right:2px;width:6px}.ps-container>.ps-scrollbar-y-rail:hover>.ps-scrollbar-y,.ps-container>.ps-scrollbar-y-rail:active>.ps-scrollbar-y{width:11px}.ps-container:hover.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail{background-color:#eee;opacity:.9}.ps-container:hover.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail>.ps-scrollbar-x{background-color:#999;height:11px}.ps-container:hover.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail{background-color:#eee;opacity:.9}.ps-container:hover.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail>.ps-scrollbar-y{background-color:#999;width:11px}.ps-container:hover>.ps-scrollbar-x-rail,.ps-container:hover>.ps-scrollbar-y-rail{opacity:.6}.ps-container:hover>.ps-scrollbar-x-rail:hover{background-color:#eee;opacity:.9}.ps-container:hover>.ps-scrollbar-x-rail:hover>.ps-scrollbar-x{background-color:#999}.ps-container:hover>.ps-scrollbar-y-rail:hover{background-color:#eee;opacity:.9}.ps-container:hover>.ps-scrollbar-y-rail:hover>.ps-scrollbar-y{background-color:#999} diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/css/theme-blue.css b/vendor/github.com/magefile/mage/site/themes/learn/static/css/theme-blue.css deleted file mode 100644 index 865ae91..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/css/theme-blue.css +++ /dev/null @@ -1,104 +0,0 @@ - -:root{ - - --MAIN-TEXT-color:#323232; /* Color of text by default */ - --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ - --MAIN-LINK-color:#1C90F3; /* Color of links */ - --MAIN-LINK-HOVER-color:#167ad0; /* Color of hovered links */ - --MAIN-ANCHOR-color: #1C90F3; /* color of anchors on titles */ - - --MENU-HEADER-BG-color:#1C90F3; /* Background color of menu header */ - --MENU-HEADER-BORDER-color:#33a1ff; /*Color of menu header border */ - - --MENU-SEARCH-BG-color:#167ad0; /* Search field background color (by default borders + icons) */ - --MENU-SEARCH-BOX-color: #33a1ff; /* Override search field border color */ - --MENU-SEARCH-BOX-ICONS-color: #a1d2fd; /* Override search field icons color */ - - --MENU-SECTIONS-ACTIVE-BG-color:#20272b; /* Background color of the active section and its childs */ - --MENU-SECTIONS-BG-color:#252c31; /* Background color of other sections */ - --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ - --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ - --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ - --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ - - --MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */ - --MENU-SECTION-HR-color: #20272b; /* Color of
    separator in menu */ - -} - -body { - color: var(--MAIN-TEXT-color) !important; -} - -textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { - border-color: none; - box-shadow: none; -} - -h2, h3, h4, h5 { - color: var(--MAIN-TITLES-TEXT-color) !important; -} - -a { - color: var(--MAIN-LINK-color); -} - -.anchor { - color: var(--MAIN-ANCHOR-color); -} - -a:hover { - color: var(--MAIN-LINK-HOVER-color); -} - -#sidebar ul li.visited > a .read-icon { - color: var(--MENU-VISITED-color); -} - -#body a.highlight:after { - display: block; - content: ""; - height: 1px; - width: 0%; - -webkit-transition: width 0.5s ease; - -moz-transition: width 0.5s ease; - -ms-transition: width 0.5s ease; - transition: width 0.5s ease; - background-color: var(--MAIN-HOVER-color); -} -#sidebar { - background-color: var(--MENU-SECTIONS-BG-color); -} -#sidebar #header-wrapper { - background: var(--MENU-HEADER-BG-color); - color: var(--MENU-SEARCH-BOX-color); - border-color: var(--MENU-HEADER-BORDER-color); -} -#sidebar .searchbox { - border-color: var(--MENU-SEARCH-BOX-color); - background: var(--MENU-SEARCH-BG-color); -} -#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { - background: var(--MENU-SECTIONS-ACTIVE-BG-color); -} -#sidebar .searchbox * { - color: var(--MENU-SEARCH-BOX-ICONS-color); -} - -#sidebar a { - color: var(--MENU-SECTIONS-LINK-color); -} - -#sidebar a:hover { - color: var(--MENU-SECTIONS-LINK-HOVER-color); -} - -#sidebar ul li.active > a { - background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); - color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; -} - -#sidebar hr { - border-color: var(--MENU-SECTION-HR-color); -} - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/css/theme-green.css b/vendor/github.com/magefile/mage/site/themes/learn/static/css/theme-green.css deleted file mode 100644 index 56bb3bf..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/css/theme-green.css +++ /dev/null @@ -1,104 +0,0 @@ - -:root{ - - --MAIN-TEXT-color:#323232; /* Color of text by default */ - --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ - --MAIN-LINK-color:#599a3e; /* Color of links */ - --MAIN-LINK-HOVER-color:#3f6d2c; /* Color of hovered links */ - --MAIN-ANCHOR-color: #599a3e; /* color of anchors on titles */ - - --MENU-HEADER-BG-color:#74b559; /* Background color of menu header */ - --MENU-HEADER-BORDER-color:#9cd484; /*Color of menu header border */ - - --MENU-SEARCH-BG-color:#599a3e; /* Search field background color (by default borders + icons) */ - --MENU-SEARCH-BOX-color: #84c767; /* Override search field border color */ - --MENU-SEARCH-BOX-ICONS-color: #c7f7c4; /* Override search field icons color */ - - --MENU-SECTIONS-ACTIVE-BG-color:#1b211c; /* Background color of the active section and its childs */ - --MENU-SECTIONS-BG-color:#222723; /* Background color of other sections */ - --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ - --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ - --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ - --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ - - --MENU-VISITED-color: #599a3e; /* Color of 'page visited' icons in menu */ - --MENU-SECTION-HR-color: #18211c; /* Color of
    separator in menu */ - -} - -body { - color: var(--MAIN-TEXT-color) !important; -} - -textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { - border-color: none; - box-shadow: none; -} - -h2, h3, h4, h5 { - color: var(--MAIN-TITLES-TEXT-color) !important; -} - -a { - color: var(--MAIN-LINK-color); -} - -.anchor { - color: var(--MAIN-ANCHOR-color); -} - -a:hover { - color: var(--MAIN-LINK-HOVER-color); -} - -#sidebar ul li.visited > a .read-icon { - color: var(--MENU-VISITED-color); -} - -#body a.highlight:after { - display: block; - content: ""; - height: 1px; - width: 0%; - -webkit-transition: width 0.5s ease; - -moz-transition: width 0.5s ease; - -ms-transition: width 0.5s ease; - transition: width 0.5s ease; - background-color: var(--MAIN-HOVER-color); -} -#sidebar { - background-color: var(--MENU-SECTIONS-BG-color); -} -#sidebar #header-wrapper { - background: var(--MENU-HEADER-BG-color); - color: var(--MENU-SEARCH-BOX-color); - border-color: var(--MENU-HEADER-BORDER-color); -} -#sidebar .searchbox { - border-color: var(--MENU-SEARCH-BOX-color); - background: var(--MENU-SEARCH-BG-color); -} -#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { - background: var(--MENU-SECTIONS-ACTIVE-BG-color); -} -#sidebar .searchbox * { - color: var(--MENU-SEARCH-BOX-ICONS-color); -} - -#sidebar a { - color: var(--MENU-SECTIONS-LINK-color); -} - -#sidebar a:hover { - color: var(--MENU-SECTIONS-LINK-HOVER-color); -} - -#sidebar ul li.active > a { - background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); - color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; -} - -#sidebar hr { - border-color: var(--MENU-SECTION-HR-color); -} - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/css/theme-red.css b/vendor/github.com/magefile/mage/site/themes/learn/static/css/theme-red.css deleted file mode 100644 index 5777deb..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/css/theme-red.css +++ /dev/null @@ -1,104 +0,0 @@ - -:root{ - - --MAIN-TEXT-color:#323232; /* Color of text by default */ - --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ - --MAIN-LINK-color:#f31c1c; /* Color of links */ - --MAIN-LINK-HOVER-color:#d01616; /* Color of hovered links */ - --MAIN-ANCHOR-color: #f31c1c; /* color of anchors on titles */ - - --MENU-HEADER-BG-color:#dc1010; /* Background color of menu header */ - --MENU-HEADER-BORDER-color:#e23131; /*Color of menu header border */ - - --MENU-SEARCH-BG-color:#b90000; /* Search field background color (by default borders + icons) */ - --MENU-SEARCH-BOX-color: #ef2020; /* Override search field border color */ - --MENU-SEARCH-BOX-ICONS-color: #fda1a1; /* Override search field icons color */ - - --MENU-SECTIONS-ACTIVE-BG-color:#2b2020; /* Background color of the active section and its childs */ - --MENU-SECTIONS-BG-color:#312525; /* Background color of other sections */ - --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ - --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ - --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ - --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ - - --MENU-VISITED-color: #ff3333; /* Color of 'page visited' icons in menu */ - --MENU-SECTION-HR-color: #2b2020; /* Color of
    separator in menu */ - -} - -body { - color: var(--MAIN-TEXT-color) !important; -} - -textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { - border-color: none; - box-shadow: none; -} - -h2, h3, h4, h5 { - color: var(--MAIN-TITLES-TEXT-color) !important; -} - -a { - color: var(--MAIN-LINK-color); -} - -.anchor { - color: var(--MAIN-ANCHOR-color); -} - -a:hover { - color: var(--MAIN-LINK-HOVER-color); -} - -#sidebar ul li.visited > a .read-icon { - color: var(--MENU-VISITED-color); -} - -#body a.highlight:after { - display: block; - content: ""; - height: 1px; - width: 0%; - -webkit-transition: width 0.5s ease; - -moz-transition: width 0.5s ease; - -ms-transition: width 0.5s ease; - transition: width 0.5s ease; - background-color: var(--MAIN-HOVER-color); -} -#sidebar { - background-color: var(--MENU-SECTIONS-BG-color); -} -#sidebar #header-wrapper { - background: var(--MENU-HEADER-BG-color); - color: var(--MENU-SEARCH-BOX-color); - border-color: var(--MENU-HEADER-BORDER-color); -} -#sidebar .searchbox { - border-color: var(--MENU-SEARCH-BOX-color); - background: var(--MENU-SEARCH-BG-color); -} -#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { - background: var(--MENU-SECTIONS-ACTIVE-BG-color); -} -#sidebar .searchbox * { - color: var(--MENU-SEARCH-BOX-ICONS-color); -} - -#sidebar a { - color: var(--MENU-SECTIONS-LINK-color); -} - -#sidebar a:hover { - color: var(--MENU-SECTIONS-LINK-HOVER-color); -} - -#sidebar ul li.active > a { - background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); - color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; -} - -#sidebar hr { - border-color: var(--MENU-SECTION-HR-color); -} - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/css/theme.css b/vendor/github.com/magefile/mage/site/themes/learn/static/css/theme.css deleted file mode 100644 index 447974c..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/css/theme.css +++ /dev/null @@ -1,1130 +0,0 @@ -@charset "UTF-8"; -#top-github-link, #body #breadcrumbs { - position: relative; - top: 50%; - -webkit-transform: translateY(-50%); - -moz-transform: translateY(-50%); - -o-transform: translateY(-50%); - -ms-transform: translateY(-50%); - transform: translateY(-50%); -} -.button, .button-secondary { - display: inline-block; - padding: 7px 12px; -} -.button:active, .button-secondary:active { - margin: 2px 0 -2px 0; -} -@font-face { - font-family: 'Novacento Sans Wide'; - src: url("../fonts/Novecentosanswide-UltraLight-webfont.eot"); - src: url("../fonts/Novecentosanswide-UltraLight-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/Novecentosanswide-UltraLight-webfont.woff2") format("woff2"), url("../fonts/Novecentosanswide-UltraLight-webfont.woff") format("woff"), url("../fonts/Novecentosanswide-UltraLight-webfont.ttf") format("truetype"), url("../fonts/Novecentosanswide-UltraLight-webfont.svg#novecento_sans_wideultralight") format("svg"); - font-style: normal; - font-weight: 200; -} -@font-face { - font-family: 'Work Sans'; - font-style: normal; - font-weight: 300; - src: url("../fonts/Work_Sans_300.eot?#iefix") format("embedded-opentype"), url("../fonts/Work_Sans_300.woff") format("woff"), url("../fonts/Work_Sans_300.woff2") format("woff2"), url("../fonts/Work_Sans_300.svg#WorkSans") format("svg"), url("../fonts/Work_Sans_300.ttf") format("truetype"); -} -@font-face { - font-family: 'Work Sans'; - font-style: normal; - font-weight: 500; - src: url("../fonts/Work_Sans_500.eot?#iefix") format("embedded-opentype"), url("../fonts/Work_Sans_500.woff") format("woff"), url("../fonts/Work_Sans_500.woff2") format("woff2"), url("../fonts/Work_Sans_500.svg#WorkSans") format("svg"), url("../fonts/Work_Sans_500.ttf") format("truetype"); -} -body { - background: #fff; - color: #777; -} -body #chapter h1 { - font-size: 3.5rem; -} -@media only all and (min-width: 48em) and (max-width: 59.938em) { - body #chapter h1 { - font-size: 3rem; - } -} -@media only all and (max-width: 47.938em) { - body #chapter h1 { - font-size: 2rem; - } -} -a { - color: #00bdf3; -} -a:hover { - color: #0082a7; -} -pre { - position: relative; - color: #ffffff; -} -.bg { - background: #fff; - border: 1px solid #eaeaea; -} -b, strong, label, th { - font-weight: 600; -} -.default-animation, #header #logo-svg, #header #logo-svg path, #sidebar, #sidebar ul, #body, #body .padding, #body .nav { - -webkit-transition: all 0.5s ease; - -moz-transition: all 0.5s ease; - transition: all 0.5s ease; -} -#grav-logo { - max-width: 60%; -} -#grav-logo path { - fill: #fff !important; -} -#sidebar { - font-weight: 300 !important; -} -fieldset { - border: 1px solid #ddd; -} -textarea, input[type="email"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="url"], input[type="color"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="month"], input[type="time"], input[type="week"], select[multiple=multiple] { - background-color: white; - border: 1px solid #ddd; - box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06); -} -textarea:hover, input[type="email"]:hover, input[type="number"]:hover, input[type="password"]:hover, input[type="search"]:hover, input[type="tel"]:hover, input[type="text"]:hover, input[type="url"]:hover, input[type="color"]:hover, input[type="date"]:hover, input[type="datetime"]:hover, input[type="datetime-local"]:hover, input[type="month"]:hover, input[type="time"]:hover, input[type="week"]:hover, select[multiple=multiple]:hover { - border-color: #c4c4c4; -} -textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { - border-color: #00bdf3; - box-shadow: inset 0 1px 3px rgba(0,0,0,.06),0 0 5px rgba(0,169,218,.7) -} -#header-wrapper { - background: #8451a1; - color: #fff; - text-align: center; - border-bottom: 4px solid #9c6fb6; - padding: 1rem; -} -#header a { - display: inline-block; -} -#header #logo-svg { - width: 8rem; - height: 2rem; -} -#header #logo-svg path { - fill: #fff; -} -.searchbox { - margin-top: 1rem; - position: relative; - border: 1px solid #915eae; - background: #764890; - border-radius: 4px; -} -.searchbox label { - color: rgba(255, 255, 255, 0.8); - position: absolute; - left: 10px; - top: 3px; -} -.searchbox span { - color: rgba(255, 255, 255, 0.6); - position: absolute; - right: 10px; - top: 3px; - cursor: pointer; -} -.searchbox span:hover { - color: rgba(255, 255, 255, 0.9); -} -.searchbox input { - display: inline-block; - color: #fff; - width: 100%; - height: 30px; - background: transparent; - border: 0; - padding: 0 25px 0 30px; - margin: 0; - font-weight: 300; -} -.searchbox input::-webkit-input-placeholder { - color: rgba(255, 255, 255, 0.6); -} -.searchbox input::-moz-placeholder { - color: rgba(255, 255, 255, 0.6); -} -.searchbox input:-moz-placeholder { - color: rgba(255, 255, 255, 0.6); -} -.searchbox input:-ms-input-placeholder { - color: rgba(255, 255, 255, 0.6); -} -#sidebar-toggle-span { - display: none; -} -@media only all and (max-width: 47.938em) { - #sidebar-toggle-span { - display: inline; - } -} -#sidebar { - background-color: #322A38; - position: fixed; - top: 0; - width: 300px; - bottom: 0; - left: 0; - font-weight: 400; - font-size: 15px; -} -#sidebar a { - color: #ccc; -} -#sidebar a:hover { - color: #e6e6e6; -} -#sidebar a.subtitle { - color: rgba(204, 204, 204, 0.6); -} -#sidebar hr { - border-bottom: 1px solid #2a232f; -} -#sidebar a.padding { - padding: 0 1rem; -} -#sidebar h5 { - margin: 2rem 0 0; - position: relative; - line-height: 2; -} -#sidebar h5 a { - display: block; - margin-left: 0; - margin-right: 0; - padding-left: 1rem; - padding-right: 1rem; -} -#sidebar h5 i { - color: rgba(204, 204, 204, 0.6); - position: absolute; - right: 0.6rem; - top: 0.7rem; - font-size: 80%; -} -#sidebar h5.parent a { - background: #201b24; - color: #d9d9d9 !important; -} -#sidebar h5.active a { - background: #fff; - color: #777 !important; -} -#sidebar h5.active i { - color: #777 !important; -} -#sidebar h5 + ul.topics { - display: none; - margin-top: 0; -} -#sidebar h5.parent + ul.topics, #sidebar h5.active + ul.topics { - display: block; -} -#sidebar ul { - list-style: none; - padding: 0; - margin: 0; -} -#sidebar ul.searched a { - color: #999999; -} -#sidebar ul.searched .search-match a { - color: #e6e6e6; -} -#sidebar ul.searched .search-match a:hover { - color: white; -} -#sidebar ul.topics { - margin: 0 1rem; -} -#sidebar ul.topics.searched ul { - display: block; -} -#sidebar ul.topics ul { - display: none; - padding-bottom: 1rem; -} -#sidebar ul.topics ul ul { - padding-bottom: 0; -} -#sidebar ul.topics li.parent ul, #sidebar ul.topics > li.active ul { - display: block; -} -#sidebar ul.topics > li > a { - line-height: 2rem; - font-size: 1.1rem; -} -#sidebar ul.topics > li > a b { - opacity: 0.5; - font-weight: normal; -} -#sidebar ul.topics > li > a .fa { - margin-top: 9px; -} -#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { - background: #251f29; - margin-left: -1rem; - margin-right: -1rem; - padding-left: 1rem; - padding-right: 1rem; -} -#sidebar ul li.active > a { - background: #fff; - color: #777 !important; - margin-left: -1rem; - margin-right: -1rem; - padding-left: 1rem; - padding-right: 1rem; -} -#sidebar ul li { - padding: 0; -} -#sidebar ul li.visited + span { - margin-right: 16px; -} -#sidebar ul li a { - display: block; - padding: 2px 0; -} -#sidebar ul li a span { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - display: block; -} -#sidebar ul li > a { - padding: 4px 0; -} -#sidebar ul li.visited > a .read-icon { - color: #9c6fb6; - display: inline; -} -#sidebar ul li li { - padding-left: 1rem; - text-indent: 0.2rem; -} -#main { - background: #f7f7f7; - margin: 0 0 1.563rem 0; -} -#body { - position: relative; - margin-left: 300px; - min-height: 100%; -} -#body .video-container { - margin: 3rem auto; - display: block; - text-align: center; -} -#body img.border, #body .video-container.border { - border: 2px solid #e6e6e6 !important; - padding: 2px; -} -#body img.shadow, #body .video-container.shadow { - box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); -} -#body img.inline { - display: inline !important; - margin: 0 !important; - vertical-align: bottom; -} -#body .bordered { - border: 1px solid #ccc; -} -#body .padding { - padding: 3rem 6rem; -} -@media only all and (max-width: 59.938em) { - #body .padding { - position: static; - padding: 15px 3rem; - } -} -@media only all and (max-width: 47.938em) { - #body .padding { - padding: 5px 1rem; - } -} -#body h1 + hr { - margin-top: -1.7rem; - margin-bottom: 3rem; -} -@media only all and (max-width: 59.938em) { - #body #navigation { - position: static; - margin-right: 0 !important; - width: 100%; - display: table; - } -} -#body .nav { - position: fixed; - top: 0; - bottom: 0; - width: 4rem; - font-size: 50px; - height: 100%; - cursor: pointer; - display: table; - text-align: center; -} -#body .nav > i { - display: table-cell; - vertical-align: middle; - text-align: center; -} -@media only all and (max-width: 59.938em) { - #body .nav { - display: table-cell; - position: static; - top: auto; - width: 50%; - text-align: center; - height: 100px; - line-height: 100px; - padding-top: 0; - } - #body .nav > i { - display: inline-block; - } -} -#body .nav:hover { - background: #F6F6F6; -} -#body .nav.nav-pref { - left: 0; -} -#body .nav.nav-next { - right: 0; -} -#body-inner { - margin-bottom: 5rem; -} -#chapter { - display: flex; - align-items: center; - justify-content: center; - height: 100%; - padding: 2rem 0; -} -#chapter #body-inner { - padding-bottom: 3rem; - max-width: 80%; -} -#chapter h3 { - font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; - font-weight: 300; - text-align: center; -} -#chapter h1 { - font-size: 5rem; - border-bottom: 4px solid #F0F2F4; -} -#chapter p { - text-align: center; - font-size: 1.2rem; -} -#footer { - padding: 3rem 1rem; - color: #b3b3b3; - font-size: 13px; -} -#footer p { - margin: 0; -} -body { - font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; - font-weight: 300; - line-height: 1.6; - font-size: 18px !important; -} -h2, h3, h4, h5, h6 { - font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; - text-rendering: optimizeLegibility; - color: #5e5e5e; - font-weight: 400; - letter-spacing: -1px; -} -h1 { - font-family: "Novacento Sans Wide", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; - text-align: center; - text-transform: uppercase; - color: #222; - font-weight: 200; -} -blockquote { - border-left: 10px solid #F0F2F4; -} -blockquote p { - font-size: 1.1rem; - color: #999; -} -blockquote cite { - display: block; - text-align: right; - color: #666; - font-size: 1.2rem; -} -div.notices { - margin: 2rem 0; - position: relative; -} -div.notices p { - padding: 15px; - display: block; - font-size: 1rem; - margin-top: 0rem; - margin-bottom: 0rem; - color: #666; -} -div.notices p:first-child:before { - position: absolute; - top: 2px; - color: #fff; - font-family: FontAwesome; - content: ''; - left: 10px; -} -div.notices p:first-child:after { - position: absolute; - top: 2px; - color: #fff; - left: 2rem; -} -div.notices.info p { - border-top: 30px solid #F0B37E; - background: #FFF2DB; -} -div.notices.info p:first-child:after { - content: 'Info'; -} -div.notices.warning p { - border-top: 30px solid rgba(217, 83, 79, 0.8); - background: #FAE2E2; -} -div.notices.warning p:first-child:after { - content: 'Warning'; -} -div.notices.note p { - border-top: 30px solid #6AB0DE; - background: #E7F2FA; -} -div.notices.note p:first-child:after { - content: 'Note'; -} -div.notices.tip p { - border-top: 30px solid rgba(92, 184, 92, 0.8); - background: #E6F9E6; -} -div.notices.tip p:first-child:after { - content: 'Tip'; -} - -/* attachments shortcode */ - -section.attachments { - margin: 2rem 0; - position: relative; -} - -section.attachments label { - font-weight: 400; - padding-left: 0.5em; - padding-top: 0.2em; - padding-bottom: 0.2em; - margin: 0; -} - -section.attachments .attachments-files { - padding: 15px; - display: block; - font-size: 1rem; - margin-top: 0rem; - margin-bottom: 0rem; - color: #666; -} - -section.attachments.orange label { - color: #fff; - background: #F0B37E; -} - -section.attachments.orange .attachments-files { - background: #FFF2DB; -} - -section.attachments.green label { - color: #fff; - background: rgba(92, 184, 92, 0.8); -} - -section.attachments.green .attachments-files { - background: #E6F9E6; -} - -section.attachments.blue label { - color: #fff; - background: #6AB0DE; -} - -section.attachments.blue .attachments-files { - background: #E7F2FA; -} - -section.attachments.grey label { - color: #fff; - background: #505d65; -} - -section.attachments.grey .attachments-files { - background: #f4f4f4; -} - -/* Children shortcode */ - -/* Children shortcode */ -.children p { - font-size: small; - margin-top: 0px; - padding-top: 0px; - margin-bottom: 0px; - padding-bottom: 0px; -} -.children-li p { - font-size: small; - font-style: italic; - -} -.children-h2 p, .children-h3 p { - font-size: small; - margin-top: 0px; - padding-top: 0px; - margin-bottom: 0px; - padding-bottom: 0px; -} -.children h3,.children h2 { - margin-bottom: 0px; - margin-top: 5px; -} - -code, kbd, pre, samp { - font-family: "Consolas", menlo, monospace; - font-size: 92%; -} -code { - border-radius: 2px; - white-space: nowrap; - color: #5e5e5e; - background: #FFF7DD; - border: 1px solid #fbf0cb; - padding: 0px 2px; -} -code + .copy-to-clipboard { - margin-left: -1px; - border-left: 0 !important; - font-size: inherit !important; - vertical-align: middle; - height: 21px; - top: 0; -} -pre { - padding: 1rem; - margin: 2rem 0; - background: #1d1f21; - border: 0; - border-radius: 2px; - line-height: 1.15; -} -pre code { - color: whitesmoke; - background: inherit; - white-space: inherit; - border: 0; - padding: 0; - margin: 0; - font-size: 15px; -} -hr { - border-bottom: 4px solid #F0F2F4; -} -.page-title { - margin-top: -25px; - padding: 25px; - float: left; - clear: both; - background: #9c6fb6; - color: #fff; -} -#body a.anchor-link { - color: #ccc; -} -#body a.anchor-link:hover { - color: #9c6fb6; -} -#body-inner .tabs-wrapper.ui-theme-badges { - background: #1d1f21; -} -#body-inner .tabs-wrapper.ui-theme-badges .tabs-nav li { - font-size: 0.9rem; - text-transform: uppercase; -} -#body-inner .tabs-wrapper.ui-theme-badges .tabs-nav li a { - background: #35393c; -} -#body-inner .tabs-wrapper.ui-theme-badges .tabs-nav li.current a { - background: #4d5257; -} -#body-inner pre { - white-space: pre-wrap; -} -.tabs-wrapper pre { - margin: 1rem 0; - border: 0; - padding: 0; - background: inherit; -} -table { - border: 1px solid #eaeaea; - table-layout: auto; -} -th { - background: #f7f7f7; - padding: 0.5rem; -} -td { - padding: 0.5rem; - border: 1px solid #eaeaea; -} -.button { - background: #9c6fb6; - color: #fff; - box-shadow: 0 3px 0 #00a5d4; -} -.button:hover { - background: #00a5d4; - box-shadow: 0 3px 0 #008db6; - color: #fff; -} -.button:active { - box-shadow: 0 1px 0 #008db6; -} -.button-secondary { - background: #F8B450; - color: #fff; - box-shadow: 0 3px 0 #f7a733; -} -.button-secondary:hover { - background: #f7a733; - box-shadow: 0 3px 0 #f69b15; - color: #fff; -} -.button-secondary:active { - box-shadow: 0 1px 0 #f69b15; -} -.bullets { - margin: 1.7rem 0; - margin-left: -0.85rem; - margin-right: -0.85rem; - overflow: auto; -} -.bullet { - float: left; - padding: 0 0.85rem; -} -.two-column-bullet { - width: 50%; -} -@media only all and (max-width: 47.938em) { - .two-column-bullet { - width: 100%; - } -} -.three-column-bullet { - width: 33.33333%; -} -@media only all and (max-width: 47.938em) { - .three-column-bullet { - width: 100%; - } -} -.four-column-bullet { - width: 25%; -} -@media only all and (max-width: 47.938em) { - .four-column-bullet { - width: 100%; - } -} -.bullet-icon { - float: left; - background: #9c6fb6; - padding: 0.875rem; - width: 3.5rem; - height: 3.5rem; - border-radius: 50%; - color: #fff; - font-size: 1.75rem; - text-align: center; -} -.bullet-icon-1 { - background: #9c6fb6; -} -.bullet-icon-2 { - background: #00f3d8; -} -.bullet-icon-3 { - background: #e6f300; -} -.bullet-content { - margin-left: 4.55rem; -} -.tooltipped { - position: relative; -} -.tooltipped:after { - position: absolute; - z-index: 1000000; - display: none; - padding: 5px 8px; - font: normal normal 11px/1.5 "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; - color: #fff; - text-align: center; - text-decoration: none; - text-shadow: none; - text-transform: none; - letter-spacing: normal; - word-wrap: break-word; - white-space: pre; - pointer-events: none; - content: attr(aria-label); - background: rgba(0, 0, 0, 0.8); - border-radius: 3px; - -webkit-font-smoothing: subpixel-antialiased; -} -.tooltipped:before { - position: absolute; - z-index: 1000001; - display: none; - width: 0; - height: 0; - color: rgba(0, 0, 0, 0.8); - pointer-events: none; - content: ""; - border: 5px solid transparent; -} -.tooltipped:hover:before, .tooltipped:hover:after, .tooltipped:active:before, .tooltipped:active:after, .tooltipped:focus:before, .tooltipped:focus:after { - display: inline-block; - text-decoration: none; -} -.tooltipped-s:after, .tooltipped-se:after, .tooltipped-sw:after { - top: 100%; - right: 50%; - margin-top: 5px; -} -.tooltipped-s:before, .tooltipped-se:before, .tooltipped-sw:before { - top: auto; - right: 50%; - bottom: -5px; - margin-right: -5px; - border-bottom-color: rgba(0, 0, 0, 0.8); -} -.tooltipped-se:after { - right: auto; - left: 50%; - margin-left: -15px; -} -.tooltipped-sw:after { - margin-right: -15px; -} -.tooltipped-n:after, .tooltipped-ne:after, .tooltipped-nw:after { - right: 50%; - bottom: 100%; - margin-bottom: 5px; -} -.tooltipped-n:before, .tooltipped-ne:before, .tooltipped-nw:before { - top: -5px; - right: 50%; - bottom: auto; - margin-right: -5px; - border-top-color: rgba(0, 0, 0, 0.8); -} -.tooltipped-ne:after { - right: auto; - left: 50%; - margin-left: -15px; -} -.tooltipped-nw:after { - margin-right: -15px; -} -.tooltipped-s:after, .tooltipped-n:after { - transform: translateX(50%); -} -.tooltipped-w:after { - right: 100%; - bottom: 50%; - margin-right: 5px; - transform: translateY(50%); -} -.tooltipped-w:before { - top: 50%; - bottom: 50%; - left: -5px; - margin-top: -5px; - border-left-color: rgba(0, 0, 0, 0.8); -} -.tooltipped-e:after { - bottom: 50%; - left: 100%; - margin-left: 5px; - transform: translateY(50%); -} -.tooltipped-e:before { - top: 50%; - right: -5px; - bottom: 50%; - margin-top: -5px; - border-right-color: rgba(0, 0, 0, 0.8); -} -.highlightable { - padding: 1rem 0 1rem; - overflow: auto; - position: relative; -} -.hljs::selection, .hljs span::selection { - background: #b7b7b7; -} -.lightbox-active #body { - overflow: visible; -} -.lightbox-active #body .padding { - overflow: visible; -} -#github-contrib i { - vertical-align: middle; -} -.featherlight img { - margin: 0 !important; -} -.lifecycle #body-inner ul { - list-style: none; - margin: 0; - padding: 2rem 0 0; - position: relative; -} -.lifecycle #body-inner ol { - margin: 1rem 0 1rem 0; - padding: 2rem; - position: relative; -} -.lifecycle #body-inner ol li { - margin-left: 1rem; -} -.lifecycle #body-inner ol strong, .lifecycle #body-inner ol label, .lifecycle #body-inner ol th { - text-decoration: underline; -} -.lifecycle #body-inner ol ol { - margin-left: -1rem; -} -.lifecycle #body-inner h3[class*='level'] { - font-size: 20px; - position: absolute; - margin: 0; - padding: 4px 10px; - right: 0; - z-index: 1000; - color: #fff; - background: #1ABC9C; -} -.lifecycle #body-inner ol h3 { - margin-top: 1rem !important; - right: 2rem !important; -} -.lifecycle #body-inner .level-1 + ol { - background: #f6fefc; - border: 4px solid #1ABC9C; - color: #16A085; -} -.lifecycle #body-inner .level-1 + ol h3 { - background: #2ECC71; -} -.lifecycle #body-inner .level-2 + ol { - background: #f7fdf9; - border: 4px solid #2ECC71; - color: #27AE60; -} -.lifecycle #body-inner .level-2 + ol h3 { - background: #3498DB; -} -.lifecycle #body-inner .level-3 + ol { - background: #f3f9fd; - border: 4px solid #3498DB; - color: #2980B9; -} -.lifecycle #body-inner .level-3 + ol h3 { - background: #34495E; -} -.lifecycle #body-inner .level-4 + ol { - background: #e4eaf0; - border: 4px solid #34495E; - color: #2C3E50; -} -.lifecycle #body-inner .level-4 + ol h3 { - background: #34495E; -} -#top-bar { - background: #F6F6F6; - border-radius: 2px; - margin: 0rem -1rem 2rem; - padding: 0 1rem; - height: 0; - min-height: 3rem; -} -#top-github-link { - position: relative; - z-index: 1; - float: right; - display: block; -} -#body #breadcrumbs { - height: auto; - margin-bottom: 0; - padding-left: 0; - line-height: 1.4; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - width: 70%; - display: inline-block; - float: left; -} -#body #breadcrumbs span { - padding: 0 0.1rem; -} -@media only all and (max-width: 59.938em) { - #sidebar { - width: 230px; - } - #body { - margin-left: 230px; - } -} -@media only all and (max-width: 47.938em) { - #sidebar { - width: 230px; - left: -230px; - } - #body { - margin-left: 0; - width: 100%; - } - .sidebar-hidden { - overflow: hidden; - } - .sidebar-hidden #sidebar { - left: 0; - } - .sidebar-hidden #body { - margin-left: 230px; - overflow: hidden; - } - .sidebar-hidden #overlay { - position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; - z-index: 10; - background: rgba(255, 255, 255, 0.5); - cursor: pointer; - } -} -.copy-to-clipboard { - background-image: url(../images/clippy.svg); - background-position: 50% 50%; - background-size: 16px 16px; - background-repeat: no-repeat; - width: 27px; - height: 1.45rem; - top: -1px; - display: inline-block; - vertical-align: middle; - position: relative; - color: #5e5e5e; - background-color: #FFF7DD; - margin-left: -.2rem; - cursor: pointer; - border-radius: 0 2px 2px 0; - margin-bottom: 1px; -} -.copy-to-clipboard:hover { - background-color: #E8E2CD; -} -pre .copy-to-clipboard { - position: absolute; - right: 4px; - top: 4px; - background-color: #4d5257; - color: #ccc; - border-radius: 2px; -} -pre .copy-to-clipboard:hover { - background-color: #656c72; - color: #fff; -} -.parent-element { - -webkit-transform-style: preserve-3d; - -moz-transform-style: preserve-3d; - transform-style: preserve-3d; -} - -#sidebar ul.topics > li > a .read-icon { - margin-top: 9px; -} - -#sidebar ul { - list-style: none; - padding: 0; - margin: 0; -} - -#sidebar #shortcuts li { - padding: 2px 0; - list-style: none; -} - -#sidebar ul li .read-icon { - display: none; - float: right; - font-size: 13px; - min-width: 16px; - margin: 4px 0 0 0; - text-align: right; -} -#sidebar ul li.visited > a .read-icon { - color: #00bdf3; - display: inline; -} - -#sidebar #shortcuts h3 { - font-family: "Novacento Sans Wide", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; - color: white ; - margin-top:1rem; - padding-left: 1rem; -} - -#searchResults { - text-align: left; -} - -/*# sourceMappingURL=theme.css.map */ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/FontAwesome.otf b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/FontAwesome.otf deleted file mode 100644 index 401ec0f..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/FontAwesome.otf and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Inconsolata.eot b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Inconsolata.eot deleted file mode 100644 index 0a705d6..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Inconsolata.eot and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Inconsolata.svg b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Inconsolata.svg deleted file mode 100644 index b7f97c8..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Inconsolata.svg +++ /dev/null @@ -1,359 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Inconsolata.ttf b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Inconsolata.ttf deleted file mode 100644 index 4b8a36d..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Inconsolata.ttf and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Inconsolata.woff b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Inconsolata.woff deleted file mode 100644 index 6f39625..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Inconsolata.woff and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-Normal-webfont.eot b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-Normal-webfont.eot deleted file mode 100644 index 9984682..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-Normal-webfont.eot and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-Normal-webfont.svg b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-Normal-webfont.svg deleted file mode 100644 index c412ea8..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-Normal-webfont.svg +++ /dev/null @@ -1,1019 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-Normal-webfont.ttf b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-Normal-webfont.ttf deleted file mode 100644 index 8cfb62d..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-Normal-webfont.ttf and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-Normal-webfont.woff b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-Normal-webfont.woff deleted file mode 100644 index d5c4290..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-Normal-webfont.woff and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-Normal-webfont.woff2 b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-Normal-webfont.woff2 deleted file mode 100644 index eefb4a3..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-Normal-webfont.woff2 and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-UltraLight-webfont.eot b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-UltraLight-webfont.eot deleted file mode 100644 index 2a26561..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-UltraLight-webfont.eot and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-UltraLight-webfont.svg b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-UltraLight-webfont.svg deleted file mode 100644 index e642ab0..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-UltraLight-webfont.svg +++ /dev/null @@ -1,918 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-UltraLight-webfont.ttf b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-UltraLight-webfont.ttf deleted file mode 100644 index 9ce9c7f..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-UltraLight-webfont.ttf and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff deleted file mode 100644 index 381650c..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff2 b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff2 deleted file mode 100644 index 7e65954..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff2 and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_200.eot b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_200.eot deleted file mode 100644 index 4052e4f..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_200.eot and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_200.svg b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_200.svg deleted file mode 100644 index 58ab4ba..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_200.svg +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_200.ttf b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_200.ttf deleted file mode 100644 index 68019e1..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_200.ttf and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_200.woff b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_200.woff deleted file mode 100644 index a1bd9e4..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_200.woff and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_200.woff2 b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_200.woff2 deleted file mode 100644 index 20c68a7..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_200.woff2 and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_300.eot b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_300.eot deleted file mode 100644 index ace7993..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_300.eot and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_300.svg b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_300.svg deleted file mode 100644 index f29d0c8..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_300.svg +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_300.ttf b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_300.ttf deleted file mode 100644 index 35387c2..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_300.ttf and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_300.woff b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_300.woff deleted file mode 100644 index 8d789ea..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_300.woff and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_300.woff2 b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_300.woff2 deleted file mode 100644 index f6e216d..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_300.woff2 and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_500.eot b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_500.eot deleted file mode 100644 index 9df6929..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_500.eot and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_500.svg b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_500.svg deleted file mode 100644 index 4b030b7..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_500.svg +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_500.ttf b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_500.ttf deleted file mode 100644 index 5b8cc53..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_500.ttf and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_500.woff b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_500.woff deleted file mode 100644 index df05851..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_500.woff and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_500.woff2 b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_500.woff2 deleted file mode 100644 index b06c54d..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/Work_Sans_500.woff2 and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/fontawesome-webfont.eot b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/fontawesome-webfont.eot deleted file mode 100644 index e9f60ca..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/fontawesome-webfont.eot and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/fontawesome-webfont.svg b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/fontawesome-webfont.svg deleted file mode 100644 index 855c845..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/fontawesome-webfont.svg +++ /dev/null @@ -1,2671 +0,0 @@ - - - - -Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 - By ,,, -Copyright Dave Gandy 2016. All rights reserved. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/fontawesome-webfont.ttf b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/fontawesome-webfont.ttf deleted file mode 100644 index 35acda2..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/fontawesome-webfont.ttf and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/fontawesome-webfont.woff b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/fontawesome-webfont.woff deleted file mode 100644 index 400014a..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/fontawesome-webfont.woff2 b/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/fontawesome-webfont.woff2 deleted file mode 100644 index 4d13fc6..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/fonts/fontawesome-webfont.woff2 and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/images/clippy.svg b/vendor/github.com/magefile/mage/site/themes/learn/static/images/clippy.svg deleted file mode 100644 index e1b1703..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/images/clippy.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/images/favicon.png b/vendor/github.com/magefile/mage/site/themes/learn/static/images/favicon.png deleted file mode 100644 index 0f3bda8..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/images/favicon.png and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/images/gopher-404.jpg b/vendor/github.com/magefile/mage/site/themes/learn/static/images/gopher-404.jpg deleted file mode 100644 index df10648..0000000 Binary files a/vendor/github.com/magefile/mage/site/themes/learn/static/images/gopher-404.jpg and /dev/null differ diff --git a/vendor/github.com/magefile/mage/site/themes/learn/static/js/clipboard.min.js b/vendor/github.com/magefile/mage/site/themes/learn/static/js/clipboard.min.js deleted file mode 100644 index 566ec6a..0000000 --- a/vendor/github.com/magefile/mage/site/themes/learn/static/js/clipboard.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * clipboard.js v1.5.5 - * https://zenorocha.github.io/clipboard.js - * - * Licensed MIT © Zeno Rocha - */ -// !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t,e,n;return function t(e,n,r){function o(a,c){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!c&&s)return s(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;ar;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],o=[];if(r&&e)for(var i=0,a=r.length;a>i;i++)r[i].fn!==e&&r[i].fn._!==e&&o.push(r[i]);return o.length?n[t]=o:delete n[t],this}},e.exports=r},{}],8:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function(){function t(t,e){for(var n=0;n0})},e=function(a,b){var c={},d=new RegExp("^"+b+"([A-Z])(.*)");for(var e in a){var f=e.match(d);if(f){var g=(f[1]+f[2].replace(/([A-Z])/g,"-$1")).toLowerCase();c[g]=a[e]}}return c},f={keyup:"onKeyUp",resize:"onResize"},g=function(c){a.each(b.opened().reverse(),function(){return c.isDefaultPrevented()||!1!==this[f[c.type]](c)?void 0:(c.preventDefault(),c.stopPropagation(),!1)})},h=function(c){if(c!==b._globalHandlerInstalled){b._globalHandlerInstalled=c;var d=a.map(f,function(a,c){return c+"."+b.prototype.namespace}).join(" ");a(window)[c?"on":"off"](d,g)}};b.prototype={constructor:b,namespace:"featherlight",targetAttr:"data-featherlight",variant:null,resetCss:!1,background:null,openTrigger:"click",closeTrigger:"click",filter:null,root:"body",openSpeed:250,closeSpeed:250,closeOnClick:"background",closeOnEsc:!0,closeIcon:"✕",loading:"",otherClose:null,beforeOpen:a.noop,beforeContent:a.noop,beforeClose:a.noop,afterOpen:a.noop,afterContent:a.noop,afterClose:a.noop,onKeyUp:a.noop,onResize:a.noop,type:null,contentFilters:["jquery","image","html","ajax","iframe","text"],setup:function(b,c){"object"!=typeof b||b instanceof a!=!1||c||(c=b,b=void 0);var d=a.extend(this,c,{target:b}),e=d.resetCss?d.namespace+"-reset":d.namespace,f=a(d.background||['
    ','
    ','',d.closeIcon,"",'
    '+d.loading+"
    ","
    ","
    "].join("")),g="."+d.namespace+"-close"+(d.otherClose?","+d.otherClose:"");return d.$instance=f.clone().addClass(d.variant),d.$instance.on(d.closeTrigger+"."+d.namespace,function(b){var c=a(b.target);("background"===d.closeOnClick&&c.is("."+d.namespace)||"anywhere"===d.closeOnClick||c.closest(g).length)&&(b.preventDefault(),d.close())}),this},getContent:function(){var b=this,c=this.constructor.contentFilters,d=function(a){return b.$currentTarget&&b.$currentTarget.attr(a)},e=d(b.targetAttr),f=b.target||e||"",g=c[b.type];if(!g&&f in c&&(g=c[f],f=b.target&&e),f=f||d("href")||"",!g)for(var h in c)b[h]&&(g=c[h],f=b[h]);if(!g){var i=f;if(f=null,a.each(b.contentFilters,function(){return g=c[this],g.test&&(f=g.test(i)),!f&&g.regex&&i.match&&i.match(g.regex)&&(f=i),!f}),!f)return"console"in window&&window.console.error("Featherlight: no content filter found "+(i?' for "'+i+'"':" (no target specified)")),!1}return g.process.call(b,f)},setContent:function(b){var c=this;return(b.is("iframe")||a("iframe",b).length>0)&&c.$instance.addClass(c.namespace+"-iframe"),c.$instance.removeClass(c.namespace+"-loading"),c.$instance.find("."+c.namespace+"-inner").slice(1).remove().end().replaceWith(a.contains(c.$instance[0],b[0])?"":b),c.$content=b.addClass(c.namespace+"-inner"),c},open:function(b){var d=this;if(d.$instance.hide().appendTo(d.root),!(b&&b.isDefaultPrevented()||d.beforeOpen(b)===!1)){b&&b.preventDefault();var e=d.getContent();if(e)return c.push(d),h(!0),d.$instance.fadeIn(d.openSpeed),d.beforeContent(b),a.when(e).always(function(a){d.setContent(a),d.afterContent(b)}).then(d.$instance.promise()).done(function(){d.afterOpen(b)})}return d.$instance.detach(),a.Deferred().reject().promise()},close:function(b){var c=this,e=a.Deferred();return c.beforeClose(b)===!1?e.reject():(0===d(c).length&&h(!1),c.$instance.fadeOut(c.closeSpeed,function(){c.$instance.detach(),c.afterClose(b),e.resolve()})),e.promise()},chainCallbacks:function(b){for(var c in b)this[c]=a.proxy(b[c],this,a.proxy(this[c],this))}},a.extend(b,{id:0,autoBind:"[data-featherlight]",defaults:b.prototype,contentFilters:{jquery:{regex:/^[#.]\w/,test:function(b){return b instanceof a&&b},process:function(b){return a(b).clone(!0)}},image:{regex:/\.(png|jpg|jpeg|gif|tiff|bmp)(\?\S*)?$/i,process:function(b){var c=this,d=a.Deferred(),e=new Image,f=a('');return e.onload=function(){f.naturalWidth=e.width,f.naturalHeight=e.height,d.resolve(f)},e.onerror=function(){d.reject(f)},e.src=b,d.promise()}},html:{regex:/^\s*<[\w!][^<]*>/,process:function(b){return a(b)}},ajax:{regex:/./,process:function(b){var c=a.Deferred(),d=a("
    ").load(b,function(a,b){"error"!==b&&c.resolve(d.contents()),c.fail()});return c.promise()}},iframe:{process:function(b){var c=new a.Deferred,d=a("