Skip to content

Commit

Permalink
add copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
Malyue committed Dec 19, 2023
1 parent 0abc61a commit 43348ae
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
15 changes: 15 additions & 0 deletions internal/core/legacy/common/ctxhelper/audit.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
// Copyright (c) 2021 Terminus, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package ctxhelper

import (
"context"

"github.com/erda-project/erda-infra/providers/i18n"
)

Expand Down
20 changes: 18 additions & 2 deletions internal/core/legacy/common/ctxhelper/audit_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
// Copyright (c) 2021 Terminus, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package ctxhelper

import (
"context"
"github.com/erda-project/erda-infra/providers/i18n"
"github.com/stretchr/testify/assert"
"testing"

"github.com/stretchr/testify/assert"

"github.com/erda-project/erda-infra/providers/i18n"
)

func TestAuditContext(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/core/legacy/endpoints/audit.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package endpoints
import (
"context"
"encoding/json"
"github.com/erda-project/erda/internal/core/legacy/common/ctxhelper"
"io"
"net/http"
"time"
Expand All @@ -27,6 +26,7 @@ import (

"github.com/erda-project/erda-infra/providers/legacy/httpendpoints/i18n"
"github.com/erda-project/erda/apistructs"
"github.com/erda-project/erda/internal/core/legacy/common/ctxhelper"
"github.com/erda-project/erda/internal/core/legacy/conf"
"github.com/erda-project/erda/internal/core/legacy/services/apierrors"
"github.com/erda-project/erda/internal/pkg/user"
Expand Down
2 changes: 1 addition & 1 deletion internal/core/legacy/services/audit/audit.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"bytes"
"context"
"encoding/json"
"github.com/erda-project/erda/internal/core/legacy/common/ctxhelper"
"io"
"strings"
"text/template"
Expand All @@ -30,6 +29,7 @@ import (
"github.com/erda-project/erda-infra/providers/i18n"
userpb "github.com/erda-project/erda-proto-go/core/user/pb"
"github.com/erda-project/erda/apistructs"
"github.com/erda-project/erda/internal/core/legacy/common/ctxhelper"
"github.com/erda-project/erda/internal/core/legacy/conf"
"github.com/erda-project/erda/internal/core/legacy/dao"
"github.com/erda-project/erda/internal/core/legacy/model"
Expand Down

0 comments on commit 43348ae

Please sign in to comment.