1. 09 Sep, 2019 1 commit
    • Kyle Clarke's avatar
      Parse/load templates from filepath in parallel · c9ac7db3
      Kyle Clarke authored
      In the spirit of using go with parallalism, the template file loader now
      uses goroutines, wait groups and channels to parse/load templates.
      Although the performance benefit personally is slight, it did highlight
      that other users of this lib would have issues with the default loader
      struct not having a sync.Mutex available. Required when parsing in
      goroutines.
      
      This also meant it was prudent to add a timeout on load so that an error
      is returned if unexpected time to load. Because this package is used for
      me personally in a private repo, I also had to create the go mod file so
      that it could be referred to locally easily with the replace directive.
      
      A new test was made and the readme updated with the new options.
      c9ac7db3
  2. 13 Aug, 2019 1 commit
    • Kyle Clarke's avatar
      Additional test cases for flash message content types · 0ed5616b
      Kyle Clarke authored
      Noticed my test coverage drop to 85% - this will not do! Back up to
      happy green zones =] Updated readme with redirect flash message binding.
      
      When binding flash messages to the request, on redirect you want to
      append the RawQuery of the request to the redirect url.
      0ed5616b
  3. 09 Aug, 2019 1 commit
    • Kyle Clarke's avatar
      Addition of content types to flash messages · 8d04ed9e
      Kyle Clarke authored
      There are times when you want more than just a string/plain text flash
      message. For example if you want to provide an html link. Go will auto
      escape strings so With Options have been created to allow the caller to
      assign the content type.
      
      Currently x3 types are available, template.HTML, template.JS and string.
      8d04ed9e
  4. 22 Mar, 2019 1 commit
    • Kyle Clarke's avatar
      Stencil - A Templating package for Go · 8b9b635d
      Kyle Clarke authored
      A package designed to take a lot of the hurt out of dealing with a web
      app and it's templates. Especially locale specifics. With flash messages
      built in too. I hope you enjoy.
      8b9b635d
  5. 15 Mar, 2019 1 commit