Skip to content

Commit

Permalink
rename struct appConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
kyokomi committed Aug 24, 2014
1 parent 3a1ab66 commit 09dd66a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions appConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ import (
"strings"
)

type appConfig struct {
type AppConfig struct {
ConfigFileName string
AppName string
}

// NewAppConfig create AppConfig.
func NewAppConfig(appName string) *appConfig {
return &appConfig{
func NewAppConfig(appName string) *AppConfig {
return &AppConfig{
ConfigFileName: "config",
AppName: appName,
}
}

// configファイルを作成する中身は空.
func (a appConfig) WriteAppConfig(data []byte) error {
func (a AppConfig) WriteAppConfig(data []byte) error {
if err := createAppConfigDir(a.AppName); err != nil {
return err
}
Expand All @@ -36,7 +36,7 @@ func (a appConfig) WriteAppConfig(data []byte) error {
}

// configファイルを読み込む[]byte.
func (a appConfig) ReadAppConfig() ([]byte, error) {
func (a AppConfig) ReadAppConfig() ([]byte, error) {
filePath, err := createAppConfigFilePath(a.AppName, a.ConfigFileName)
if err != nil {
return nil, err
Expand Down

0 comments on commit 09dd66a

Please sign in to comment.