Giter VIP home page Giter VIP logo

go-astitools's Introduction

I first created this repo to centralize all helpers that could be reused in other projects. But as time went by, it started using more and more external dependencies, which is not something I want to be doing. That's why I've decided to freeze this repo so that all projects using it still work and I've created go-astikit whom primary goal is to provide helpers using no dependencies. Use it instead of this repo that won't be maintained anymore.

Astitools

Astitools is a set of augmented functions for the GO programming language (http://golang.org).

go-astitools's People

Contributors

asticode avatar nankeen avatar oneofone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-astitools's Issues

ParseDirectory fails under Windows

Just debugged this one

Since the template name is trimmed to /index.html
what results on windows in \index.html. The template isn't found later since the names differ.

DEBU[0000] serve templates: &{name:\index.html Tree:0xc042001400 common:0xc042102900 leftDelim: rightDelim:}
DEBU[0000] serve templates: &{name:\train.html Tree:0xc042001500 common:0xc042102900 leftDelim: rightDelim:}
DEBU[0000] filepath : C:\Users\IEUser\go\src\kmine\resources\templates
DEBU[0000] Listening on 127.0.0.1:51090
DEBU[0000] Sending to Astilectron: {"name":"window.cmd.create","targetID":"1","url":"http://127.0.0.1:51090/templates/index","windowOptions":{"backgroundColor":"#333","center":true,"height":600,"title":"Kmine","width":600}}
DEBU[0000] Astilectron says: {"name":"window.event.focus","targetID":"1"}
DEBU[0002] got request : [{Key:page Value:/index}]
DEBU[0002] not found : /index.html

I propose

                // Parse template
		tName := strings.TrimPrefix(path, i)
		tName = strings.Replace(tName, `\`, `/`, 1) // flip windows leading path
		var c = t.New(tName) 

as a fix, i guess i will send a PR soon for that

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.