This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
名前 | |
@pospome | |
所属 | |
メルペイの認証基盤チーム | |
職種 | |
サーバサイドのアプリケーションエンジニア | |
興味あること |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
名前 | |
@pospome | |
所属 | |
メルペイの認証基盤チーム | |
職種 | |
サーバサイドのアプリケーションエンジニア | |
興味あること |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package handler | |
import ( | |
"net/http" | |
"fmt" | |
"vendor/google.golang.org/appengine" | |
"vendor/google.golang.org/appengine/log" | |
"strconv" | |
"vendor/google.golang.org/appengine/datastore" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// State を生成するだけの factory | |
// 生成するクラスが複雑になる場合は abstract factory を利用すると良い | |
class StateFactory { | |
public static function Create(type){ | |
if type == 1 { | |
return new State1(); | |
} | |
return new State2(); |