Basic/Base App with Go-Macaron. With user registration/login/logout, one simple admin page and user profile edit. Taken from my git.txt to simplify laters dev app.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

doc.go 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. // Copyright (c) 2012-2016, Martin Angers & Contributors
  2. // All rights reserved.
  3. //
  4. // Redistribution and use in source and binary forms, with or without modification,
  5. // are permitted provided that the following conditions are met:
  6. //
  7. // * Redistributions of source code must retain the above copyright notice,
  8. // this list of conditions and the following disclaimer.
  9. // * Redistributions in binary form must reproduce the above copyright notice,
  10. // this list of conditions and the following disclaimer in the documentation and/or
  11. // other materials provided with the distribution.
  12. // * Neither the name of the author nor the names of its contributors may be used to
  13. // endorse or promote products derived from this software without specific prior written permission.
  14. //
  15. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
  16. // OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
  18. // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  19. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  20. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  21. // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
  22. // WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  23. /*
  24. Package goquery implements features similar to jQuery, including the chainable
  25. syntax, to manipulate and query an HTML document.
  26. It brings a syntax and a set of features similar to jQuery to the Go language.
  27. It is based on Go's net/html package and the CSS Selector library cascadia.
  28. Since the net/html parser returns nodes, and not a full-featured DOM
  29. tree, jQuery's stateful manipulation functions (like height(), css(), detach())
  30. have been left off.
  31. Also, because the net/html parser requires UTF-8 encoding, so does goquery: it is
  32. the caller's responsibility to ensure that the source document provides UTF-8 encoded HTML.
  33. See the repository's wiki for various options on how to do this.
  34. Syntax-wise, it is as close as possible to jQuery, with the same method names when
  35. possible, and that warm and fuzzy chainable interface. jQuery being the
  36. ultra-popular library that it is, writing a similar HTML-manipulating
  37. library was better to follow its API than to start anew (in the same spirit as
  38. Go's fmt package), even though some of its methods are less than intuitive (looking
  39. at you, index()...).
  40. It is hosted on GitHub, along with additional documentation in the README.md
  41. file: https://github.com/puerkitobio/goquery
  42. Please note that because of the net/html dependency, goquery requires Go1.1+.
  43. The various methods are split into files based on the category of behavior.
  44. The three dots (...) indicate that various "overloads" are available.
  45. * array.go : array-like positional manipulation of the selection.
  46. - Eq()
  47. - First()
  48. - Get()
  49. - Index...()
  50. - Last()
  51. - Slice()
  52. * expand.go : methods that expand or augment the selection's set.
  53. - Add...()
  54. - AndSelf()
  55. - Union(), which is an alias for AddSelection()
  56. * filter.go : filtering methods, that reduce the selection's set.
  57. - End()
  58. - Filter...()
  59. - Has...()
  60. - Intersection(), which is an alias of FilterSelection()
  61. - Not...()
  62. * iteration.go : methods to loop over the selection's nodes.
  63. - Each()
  64. - EachWithBreak()
  65. - Map()
  66. * manipulation.go : methods for modifying the document
  67. - After...()
  68. - Append...()
  69. - Before...()
  70. - Clone()
  71. - Empty()
  72. - Prepend...()
  73. - Remove...()
  74. - ReplaceWith...()
  75. - Unwrap()
  76. - Wrap...()
  77. - WrapAll...()
  78. - WrapInner...()
  79. * property.go : methods that inspect and get the node's properties values.
  80. - Attr*(), RemoveAttr(), SetAttr()
  81. - AddClass(), HasClass(), RemoveClass(), ToggleClass()
  82. - Html()
  83. - Length()
  84. - Size(), which is an alias for Length()
  85. - Text()
  86. * query.go : methods that query, or reflect, a node's identity.
  87. - Contains()
  88. - Is...()
  89. * traversal.go : methods to traverse the HTML document tree.
  90. - Children...()
  91. - Contents()
  92. - Find...()
  93. - Next...()
  94. - Parent[s]...()
  95. - Prev...()
  96. - Siblings...()
  97. * type.go : definition of the types exposed by goquery.
  98. - Document
  99. - Selection
  100. - Matcher
  101. * utilities.go : definition of helper functions (and not methods on a *Selection)
  102. that are not part of jQuery, but are useful to goquery.
  103. - NodeName
  104. - OuterHtml
  105. */
  106. package goquery