Create new Go projects (golang)

Overview

Build Status

Gonew V2

This is Gonew V2. It improves on Gonew Classic by providing a more flexible configuration and a vastly simpler code base. If you are migrating from Gonew Classic, see the migration guide (MIGRATION.md).

About gonew

Gonew is a tool for stubbing out new golang projects.

Documentation

Detailed usage and configuration information is on godoc.org.

Help out

If you want to add more licence templates or improve existing templates please create a new issue. I'm always open to ideas regarding template improvement. But be warned that I will scrutenize these ideas and reject some. The generality of Gonew's templating system allows users to create and use custom template sets. The guideline for altering Gonew's default templates is this:

Content generated by Gonew's default templates should follow all commonly accepted best-practices for their respective file types.

Any changes to gonew's templates should result in for greater adherence to this principle.

Author

Bryan Matsuo (bmatsuo)

Copyright & License

Copyright (c) 2011, Bryan Matsuo. All rights reserved.

Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Comments
  • template.go:115: undefined: template.MustParseFile

    template.go:115: undefined: template.MustParseFile

    Hi, I am using latest weekly go release and like to try out gonew but it failed the compilation.

    [[email protected] gonew]$ pwd /home/go/go/src/pkg/github.com/bmatsuo/gonew [[email protected] gonew]$ make 6g -o go.6 config.go template.go repository.go hosts.go license.go file.go project.go gonew_main.go template.go:115: undefined: template.MustParseFile template.go:132: undefined: template.MustParseFile make: *** [go.6] Error 1 [[email protected] gonew]$

    [[email protected] gonew]$ hg id 6eb2b9dbe489 weekly/weekly.2011-08-17 [[email protected] gonew]$

    opened by tjyang 15
  • Update dependency from missing repo

    Update dependency from missing repo

    Looks like @kless' goconfig repo disappeared. I found a fork, and things seem to build and behave OK on that fork.

    Let me know if I'm totally cracked here...I'm rather new to Go and it's world view.

    Bug 
    opened by bradhe 2
  • gonew without argument should return help message

    gonew without argument should return help message

    Current

    [[email protected]fedora15-64 ~]$ gonew missing TYPE argument [[email protected] ~]$

    Hope to see

    [[email protected] ~]$ gonew

    gonew [options] cmd NAME gonew [options] pkg NAME gonew [options] lib NAME PKG

    Usage of gonew: -debug=-1: Change the amout of debug output. -help=false: Show this message. -host="": Repository host if any (e.g. 'github'). -license="": Project license (e.g. 'newbsd'). -remote="": Remote repository url to initialize and push to. -repo="git": Repository type (e.g. 'git'). -target="": Makefile target. Default based on NAME. -test=true: Produce test files with Go files. -user="": Repo host username. -userepo=true: Create a local repository. -v=false: Verbose output. [[email protected] ~]$

    Feature 
    opened by tjyang 2
  • .gonewrc not found warning

    .gonewrc not found warning

    opened by tjyang 2
  • Patch for fix fail on FindGonew()

    Patch for fix fail on FindGonew()

    After got gonew with go get, following error happened in FindGonew()

    error finding gonew source directory:
        stat $(GOROOT)/src/gonew: no such file or directory
    

    It happened bacause $(GOROOT)/src/github.com/bmatsuo/gonew not exists. In my case, go1.x in Ubuntu Linux, corrent path for gonew is;

    $(GOROOT)/src/pkg/github.com/bmatsuo/gonew
    

    Fixed FindGonew() to check exist of;

    • $(GOROOT)/src/pkg/github.com/bmatsuo/gonew
    • $(GOROOT)/src/github.com/bmatsuo/gonew
    • $(GOROOT)/src/gonew
    Bug 
    opened by suapapa 1
  • Small change to .gitignore file

    Small change to .gitignore file

    I suggest a few changes to the .gitignore file that gonew creates, maybe it would be smart to add the following lines (or something close) to ignore backup files from text editors and temporary files from Vim

    *~*
    *.swp
    

    The first line may also work as *~ to allow for tilde in the filename, there may be others that may be good to add that I can not think of at the moment.

    Templates 
    opened by vendion 1
  • Errors out during install

    Errors out during install

    When trying to install gonew via the go install command it errors out with this

    # github.com/bmatsuo/gonew
    
    gocode/src/github.com/bmatsuo/gonew/config.go:101: undefined: os.ENOENT
    gocode/src/github.com/bmatsuo/gonew/config.go:104: undefined: os.ENOENT
    gocode/src/github.com/bmatsuo/gonew/gonew_main.go:144: undefined: os.ENOENT```
    
    I am using go version weekly.2012-02-22 +a28cc319fc47
    
    I can find `ENOENT` as a constant in the `syscall` package but not the `os` package.
    
    Bug 
    opened by vendion 1
  • Infer proper package names

    Infer proper package names

    Gonew should be smarter about package (target) names for "pkg" commands so that supplying the -target flag is unnecessary in most situations. Specifically, it should make the following assumptions:

    • Projects named "go-foo" should contain a package named "foo"
    • Projects named "bar.go" should contain a package named "bar"

    Nothing special should be done for projects named "gobaz". It seems to me the most common practice for projects with these names is for the package to be retain the "go" prefix.

    Feature 
    opened by bmatsuo 0
  • Infer proper package names for libraries

    Infer proper package names for libraries

    The third argument for "lib" commands should be optional. Gonew should attempt to infer the package name from golang source files in the same directory. If there are no source files in the current directory, Gonew should default to package "main".

    Feature 
    opened by bmatsuo 0
Owner
Bryan Matsuo
Bryan Matsuo
golang feature toggle library - a library to help make golang feature toggling clean and easy

toggle supports env_variable backed toggling. It can also be updated via a pubsub interface (tested w/ redis) 2 engines for toggle backing are include

John Calabrese 24 Mar 29, 2022
go-watcher 是一款实现 Golang 源码热重启的工具

go-watcher 是一款实现 Golang 源码热重启的工具,可替换 go run 命令执行任意 main 入口程序,包括参数

null 10 Jan 7, 2022
Create new Go projects (golang)

Gonew V2 This is Gonew V2. It improves on Gonew Classic by providing a more flexible configuration and a vastly simpler code base. If you are migratin

Bryan Matsuo 48 Jul 29, 2020
Clones github projects into ~/Projects/github/{org}/{repo}

Tidy clone Github cli extension (gh extension) to clone repos into ~/Projects/github/{org}/{repo} on the local filesystem Install gh extension install

Pascal Welsch 1 Jan 19, 2022
Application open new tab in chrome when your favourite youtuber add new video.

youtube-opener This application open new tab in Chrome when your favourite youtuber add new video. It checks channel every one minute. How to run go r

null 1 Jan 16, 2022
James is your butler and helps you to create, build, debug, test and run your Go projects

go-james James is your butler and helps you to create, build, debug, test and run your Go projects. When you often create new apps using Go, it quickl

Pieter Claerhout 56 Oct 8, 2022
Godzillacli - Create, Run Godzilla Projects Using Godzilla CLI

godzillacli Create, Run Godzilla Projects Using Godzilla CLI About: godzillacli

godzillaframework 1 Jan 23, 2022
Create new commands from your shell history or terminal.

overdub Create new commands from your shell history or terminal. TODO list for initial release Filter out unlikely commands (e.g. package managers) fr

Michael Zalimeni 6 Aug 9, 2022
Create a new OpenAPI based blink-plugin

OpenAPI plugin template Create a new OpenAPI based blink-plugin. READ FIRST Getting the Repo Option 1: From Github Press Use this template Naming conv

Blink 0 Oct 14, 2021
✨ Create a new production-ready project with backend, frontend and deploy automation by running one CLI command!

✨ Create a new production-ready project with backend, frontend and deploy automation by running one CLI command!

Create Go App 1.6k Nov 19, 2022
A helper function to create a pointer to a new object in Go 1.18+

A helper function to create a pointer to a new object in Go 1.18+

Carl Johnson 52 Nov 9, 2022
Traefik proxy plugin to extract HTTP header value and create a new header with extracted value

Copy header value Traefik plugin Traefik plugin that copies HTTP header value with format key1=value1; key2=value2 into a new header. Motivation for t

Argyle 3 May 26, 2022
Package create provides a generic option pattern for creating new values of any type

create Package create provides a generic option pattern for creating new values

null 1 Dec 30, 2021
A new way to create web applications using go and sdf framework.

SDF GO A new way to create web applications using go and sdf framework Explore the docs » View Demo · Report Bug · Request Feature Table of Contents A

Metin Simsek 1 Sep 27, 2022
It is a clone of the CRUD operations on Instagram which can create, get, create posts and get the post along with pagination

Instagram-API-Clone It is a basic version of a RESTful API based on Instagram where we can create user, get the users, create post and get post and ge

Ayan Sadhukhan 2 Jan 25, 2022
Node is where client will send data to, create block send to miner, create block send to parent and receive tick from validator and do validate

Node Receive Tick from validator Validate POH of tick send result to validator Receive confirm block from validator Send Checked block to validator Ho

Hieu Phan 0 Dec 31, 2021
Genv is a library for Go (golang) that makes it easy to read and use environment variables in your projects. It also allows environment variables to be loaded from the .env file.

genv Genv is a library for Go (golang) that makes it easy to read and use environment variables in your projects. It also allows environment variables

Şakir Şensoy 30 Nov 10, 2022
PlantUML Class Diagram Generator for golang projects

GoPlantUML PlantUML Class Diagram Generator for golang projects. Generates class diagram text compatible with plantuml with the information of all str

Javier Feliu 1.2k Nov 18, 2022
Set of reusable components for Golang projects

go-utils Table of contents go-utils Table of contents 1. Overview 2. Install 3. Utils package 3.1 logger 3.2 error 3.3 datetime 1. Overview In my free

AJPham 7 Sep 12, 2022
go/template is a tool for jumpstarting production-ready Golang projects quickly.

go/template go/template provides a blueprint for production-ready Go project layouts. Credit to Renée French for the Go Gopher logo Credit to Go Autho

Schwarz IT 91 Nov 21, 2022