mirror of
https://github.com/gohugoio/hugo.git
synced 2025-03-21 07:51:01 +00:00
commands: Apply Golint rules
This commit is contained in:
parent
5d3705df16
commit
7c81c86bdd
2 changed files with 3 additions and 2 deletions
|
@ -108,7 +108,7 @@ func importFromJekyll(cmd *cobra.Command, args []string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
relPath = filepath.ToSlash(relPath)
|
relPath = filepath.ToSlash(relPath)
|
||||||
var draft bool = false
|
draft := false
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case strings.HasPrefix(relPath, "_posts/"):
|
case strings.HasPrefix(relPath, "_posts/"):
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package commands
|
package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -31,7 +32,7 @@ If the content's draft status is 'False', nothing is done.`,
|
||||||
RunE: Undraft,
|
RunE: Undraft,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Publish publishes the specified content by setting its draft status
|
// Undraft publishes the specified content by setting its draft status
|
||||||
// to false and setting its publish date to now. If the specified content is
|
// to false and setting its publish date to now. If the specified content is
|
||||||
// not a draft, it will log an error.
|
// not a draft, it will log an error.
|
||||||
func Undraft(cmd *cobra.Command, args []string) error {
|
func Undraft(cmd *cobra.Command, args []string) error {
|
||||||
|
|
Loading…
Reference in a new issue