1 // Copyright (c) 2014-2019 TSUYUSATO Kitsune 2 // This software is released under the MIT License. 3 // http://opensource.org/licenses/mit-license.php 4 5 // Package heredoc_dot is the set of shortcuts for dot import. 6 // 7 // It is useful for using in test, but I don't recommend to use this in 8 // production code. 9 // See https://github.com/golang/lint/issues/179. 10 // 11 // For example: 12 // 13 // package main 14 // 15 // import ( 16 // "fmt" 17 // "runtime" 18 // . "github.com/MakeNowJust/heredoc/dot" 19 // ) 20 // 21 // func main() { 22 // fmt.Printf(D(` 23 // GOROOT: %s 24 // GOARCH: %s 25 // GOOS : %s 26 // `), runtime.GOROOT(), runtime.GOARCH, runtime.GOOS) 27 // } 28 package heredoc_dot 29 30 import "github.com/MakeNowJust/heredoc" 31 32 // Shortcut heredoc.Doc. 33 func D(raw string) string { 34 return heredoc.Doc(raw) 35 } 36 37 // Shortcut heredoc.Docf. 38 func Df(raw string, args ...interface{}) string { 39 return heredoc.Docf(raw, args...) 40 } 41