0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GAE/Goのディレクトリ階層例(no vendoring)

Last updated at Posted at 2018-08-07

今回前提とするディレクトリ階層

root
+ プロジェクトディレクトリ
  + src
    + somedirectory
    + app.yaml

+ 3rd party library go get用ディレクトリ
  + src
    + github.com
    + google.golang.org
    + ...

既存プロジェクトですのでvendorなどは考慮しておりません。

ローカルサーバー、デプロイ

$ export GOPATH=/.../root/3rd party library go get用ディレクトリ
$ cd /.../root/プロジェクトディレクトリ/

$ goapp serve ./src
$ dev_appserver.py ./src --default_gcs_bucket_name [BUCKET_NAME]

$ appcfg.py update ./src -A [APP_ID] -V [VERSION]

デプロイできない場合は、 ~/.appcfg_oauth2_tokens を削除してみる。

テスト

$ export GOPATH=/.../root/3rd party library go get用ディレクトリ:/.../root/プロジェクトディレクトリ
$ cd /.../root/プロジェクトディレクトリ/src

$ goapp test ./...
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?