Skip to content

Commit 0b67e59

Browse files
authored
update license template (#6)
1 parent 6740768 commit 0b67e59

22 files changed

+120
-59
lines changed

.github/workflows/license.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: License Checking
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
license:
13+
name: License Checking
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@master
17+
- name: Check License Lines
18+
uses: kt3k/license_checker@v1.0.6

.licenserc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"**/*.go" :[
3+
"/*",
4+
"* Licensed to the AcmeStack under one or more contributor license",
5+
"* agreements. See the NOTICE file distributed with this work for",
6+
"* additional information regarding copyright ownership.",
7+
"* Licensed under the Apache License, Version 2.0 (the \"License\");",
8+
"* you may not use this file except in compliance with the License.",
9+
"* You may obtain a copy of the License at",
10+
"*",
11+
"* http://www.apache.org/licenses/LICENSE-2.0",
12+
"*",
13+
"* Unless required by applicable law or agreed to in writing, software",
14+
"* distributed under the License is distributed on an \"AS IS\" BASIS,",
15+
"* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
16+
"* See the License for the specific language governing permissions and",
17+
"* limitations under the License.",
18+
"*/"
19+
20+
]
21+
}

NOTICE

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Copyright (c) 2013 - 2022, AcmeStack
2+
All rights reserved.
3+
4+
This product includes software developed at
5+
The AcmeStack (https://www.acmestack.org/).

cmd/gobatis-plus/customargs/args.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

cmd/gobatis-plus/main.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at
@@ -23,7 +23,6 @@ import (
2323
"github.com/acmestack/gobatis-plus/cmd/gobatis-plus/customargs"
2424
"github.com/acmestack/gobatis-plus/pkg/generator"
2525
"github.com/spf13/pflag"
26-
"k8s.io/klog/v2"
2726
)
2827

2928
func main() {

example/doc.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

example/example.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

pkg/constants/keyword.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

pkg/constants/string_pool.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

pkg/generator/gobatis-gen.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at
@@ -29,7 +29,6 @@ import (
2929
"k8s.io/gengo/generator"
3030
"k8s.io/gengo/namer"
3131
"k8s.io/gengo/types"
32-
"k8s.io/klog/v2"
3332
)
3433

3534
var (

pkg/mapper/base.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

pkg/mapper/base_mapper.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at
@@ -19,12 +19,13 @@ package mapper
1919

2020
import (
2121
"context"
22-
"github.com/acmestack/gobatis"
23-
"github.com/acmestack/gobatis-plus/pkg/constants"
2422
"reflect"
2523
"strconv"
2624
"strings"
2725
"time"
26+
27+
"github.com/acmestack/gobatis"
28+
"github.com/acmestack/gobatis-plus/pkg/constants"
2829
)
2930

3031
type BaseMapper[T any] struct {

pkg/mapper/base_mapper_test.go

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,31 @@
1+
/*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package mapper
219

320
import (
421
"encoding/json"
522
"fmt"
23+
"testing"
24+
625
"github.com/acmestack/gobatis"
726
"github.com/acmestack/gobatis/datasource"
827
"github.com/acmestack/gobatis/factory"
928
_ "github.com/go-sql-driver/mysql"
10-
"testing"
1129
)
1230

1331
func connect() factory.Factory {

pkg/mapper/query_wrapper.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

pkg/mapper/wapper.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

pkg/mapper/wrapper.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

pkg/parser/tags.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

pkg/plugin/constants.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

pkg/plugin/data.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

pkg/plugin/mapper.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

pkg/plugin/plugin.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

pkg/plugin/register.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Copyright (c) 2022, AcmeStack
3-
* All rights reserved.
4-
*
2+
* Licensed to the AcmeStack under one or more contributor license
3+
* agreements. See the NOTICE file distributed with this work for
4+
* additional information regarding copyright ownership.
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
77
* You may obtain a copy of the License at

0 commit comments

Comments
 (0)