Skip to content

Commit

Permalink
Update license related comments in codes
Browse files Browse the repository at this point in the history
  • Loading branch information
dongxuny committed Sep 2, 2021
1 parent b162227 commit 0f8a4fb
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 26 deletions.
2 changes: 1 addition & 1 deletion common/common.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2021 rookie-ninja
//
// Use of this source code is governed by an MIT-style
// Use of this source code is governed by an Apache-style
// license that can be found in the LICENSE file.
package rkcommon

Expand Down
2 changes: 1 addition & 1 deletion common/common_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2021 rookie-ninja
//
// Use of this source code is governed by an MIT-style
// Use of this source code is governed by an Apache-style
// license that can be found in the LICENSE file.
package rkcommon

Expand Down
2 changes: 1 addition & 1 deletion common/flags.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2021 rookie-ninja
//
// Use of this source code is governed by an MIT-style
// Use of this source code is governed by an Apache-style
// license that can be found in the LICENSE file.
package rkcommon

Expand Down
37 changes: 18 additions & 19 deletions common/rk.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2021 rookie-ninja
//
// Use of this source code is governed by an MIT-style
// Use of this source code is governed by an Apache-style
// license that can be found in the LICENSE file.
package rkcommon

Expand All @@ -14,12 +14,12 @@ import (
)

const (
RkMetaFilePath = ".rk/rk.yaml"
RkDepFilePath = ".rk/dep/go.mod"
RkUtHtmlFilePath = ".rk/ut/cov.html"
RkUtOutFilepath = ".rk/ut/cov.out"
RkMetaFilePath = ".rk/rk.yaml"
RkDepFilePath = ".rk/dep/go.mod"
RkUtHtmlFilePath = ".rk/ut/cov.html"
RkUtOutFilepath = ".rk/ut/cov.out"
RkLicenseFilePath = ".rk/LICENSE"
RkReadmeFilePath = ".rk/README.md"
RkReadmeFilePath = ".rk/README.md"
)

var (
Expand Down Expand Up @@ -54,23 +54,23 @@ var (
)

type RkMeta struct {
Name string `json:"name" yaml:"name"`
Version string `json:"version" yaml:"version"`
Git *Git `json:"git" yaml:"git"`
Name string `json:"name" yaml:"name"`
Version string `json:"version" yaml:"version"`
Git *Git `json:"git" yaml:"git"`
}

type Git struct {
Url string `yaml:"url" json:"url"`
Branch string `yaml:"branch" json:"branch"`
Tag string `yaml:"tag" json:"tag"`
Commit *Commit `yaml:"commit" json:"commit"`
Url string `yaml:"url" json:"url"`
Branch string `yaml:"branch" json:"branch"`
Tag string `yaml:"tag" json:"tag"`
Commit *Commit `yaml:"commit" json:"commit"`
}

type Commit struct {
Id string `yaml:"id" json:"id"`
Date string `yaml:"date" json:"date"`
IdAbbr string `yaml:"idAbbr" json:"idAbbr"`
Sub string `yaml:"sub" json:"sub"`
Id string `yaml:"id" json:"id"`
Date string `yaml:"date" json:"date"`
IdAbbr string `yaml:"idAbbr" json:"idAbbr"`
Sub string `yaml:"sub" json:"sub"`
Committer *Committer `yaml:"committer" json:"committer"`
}

Expand Down Expand Up @@ -200,7 +200,6 @@ func GetGoPkgName() string {

return res


return path.Base(GetGoEnv().GoMod)
}

Expand Down Expand Up @@ -247,4 +246,4 @@ func GetRkMetaFromCmd() *RkMeta {
}

return meta
}
}
2 changes: 1 addition & 1 deletion common/strvals.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2021 rookie-ninja
//
// Use of this source code is governed by an MIT-style
// Use of this source code is governed by an Apache-style
// license that can be found in the LICENSE file.
//
// Copied from https://github.com/helm/helm/tree/master/pkg/strvals
Expand Down
4 changes: 4 additions & 0 deletions error/error.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2021 rookie-ninja
//
// Use of this source code is governed by an Apache-style
// license that can be found in the LICENSE file.
package rkerror

import (
Expand Down
2 changes: 1 addition & 1 deletion error/gen/error.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions error/grpc_error_wrap.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2021 rookie-ninja
//
// Use of this source code is governed by an Apache-style
// license that can be found in the LICENSE file.
package rkerror

import (
Expand Down Expand Up @@ -34,8 +38,8 @@ func BaseErrorWrapper(code codes.Code) ErrorWrapper {

// Inject grpc error as detail
st, _ = st.WithDetails(&rk_error.ErrorDetail{
Code: int32(code),
Status: code.String(),
Code: int32(code),
Status: code.String(),
Message: fmt.Sprintf("[from-grpc] %s", msg),
})

Expand Down

0 comments on commit 0f8a4fb

Please sign in to comment.