Fix section name guessing on Windows
authorNuno Antunes <nunontns@gmail.com>
Sat, 28 Mar 2015 16:22:34 +0000 (16:22 +0000)
committerbep <bjorn.erik.pedersen@gmail.com>
Sat, 28 Mar 2015 20:43:55 +0000 (21:43 +0100)
commands/new.go

index 5721b7f8892a2cef993776b99b0966df63b56cae..28831bf07d50dbf95aad3db6e03b9c6d0403d02e 100644 (file)
@@ -93,7 +93,7 @@ func NewContent(cmd *cobra.Command, args []string) {
        var kind string
 
        // assume the first directory is the section (kind)
-       if strings.Contains(createpath[1:], "/") {
+       if strings.Contains(createpath[1:], string(filepath.Separator)) {
                kind = helpers.GuessSection(createpath)
        }