mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 05:06:51 +00:00
GODT-1260: Renaming
* Renaming GUI, CLI, no-impact config. * License header and documentation rebranding. * Rename app title and vendor. Impact: manual install * Migrating mac keychain and launch on startup. * Fix linter and linter renaming
This commit is contained in:
@ -1,19 +1,19 @@
|
||||
// Copyright (c) 2022 Proton Technologies AG
|
||||
// Copyright (c) 2022 Proton AG
|
||||
//
|
||||
// This file is part of ProtonMail Bridge.
|
||||
// This file is part of Proton Mail Bridge.
|
||||
//
|
||||
// ProtonMail Bridge is free software: you can redistribute it and/or modify
|
||||
// Proton Mail Bridge is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ProtonMail Bridge is distributed in the hope that it will be useful,
|
||||
// Proton Mail Bridge is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with ProtonMail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
package parallel
|
||||
|
||||
@ -34,7 +34,7 @@ type parallelJob struct {
|
||||
// the input and is passed in order to the `collect` callback. If an error
|
||||
// occurs, the execution is stopped and the error returned.
|
||||
// runParallel blocks until everything is done.
|
||||
func RunParallel( //nolint[funlen]
|
||||
func RunParallel( //nolint:funlen
|
||||
workers int,
|
||||
input []interface{},
|
||||
process func(interface{}) (interface{}, error),
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
// Copyright (c) 2022 Proton Technologies AG
|
||||
// Copyright (c) 2022 Proton AG
|
||||
//
|
||||
// This file is part of ProtonMail Bridge.
|
||||
// This file is part of Proton Mail Bridge.
|
||||
//
|
||||
// ProtonMail Bridge is free software: you can redistribute it and/or modify
|
||||
// Proton Mail Bridge is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ProtonMail Bridge is distributed in the hope that it will be useful,
|
||||
// Proton Mail Bridge is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with ProtonMail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
package parallel
|
||||
|
||||
@ -28,7 +28,7 @@ import (
|
||||
r "github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
// nolint[gochecknoglobals]
|
||||
//nolint:gochecknoglobals
|
||||
var (
|
||||
testInput = []interface{}{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
|
||||
wantOutput = []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
|
||||
@ -45,7 +45,7 @@ func TestParallel(t *testing.T) {
|
||||
t.Run(fmt.Sprintf("%d", workers), func(t *testing.T) {
|
||||
collected := make([]int, 0)
|
||||
collect := func(idx int, value interface{}) error {
|
||||
collected = append(collected, value.(int))
|
||||
collected = append(collected, value.(int)) //nolint:forcetypeassert
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -88,13 +88,13 @@ func TestParallelErrorInProcess(t *testing.T) {
|
||||
var lastCollected int
|
||||
process := func(value interface{}) (interface{}, error) {
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
if value.(int) == 5 {
|
||||
if value.(int) == 5 { //nolint:forcetypeassert
|
||||
return nil, errors.New("Error")
|
||||
}
|
||||
return value, nil
|
||||
}
|
||||
collect := func(idx int, value interface{}) error {
|
||||
lastCollected = value.(int) //nolint[forcetypeassert]
|
||||
lastCollected = value.(int) //nolint:forcetypeassert
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ func TestParallelErrorInCollect(t *testing.T) {
|
||||
workers := workers
|
||||
t.Run(fmt.Sprintf("%d", workers), func(t *testing.T) {
|
||||
collect := func(idx int, value interface{}) error {
|
||||
if value.(int) == 5 {
|
||||
if value.(int) == 5 { //nolint:forcetypeassert
|
||||
return errors.New("Error")
|
||||
}
|
||||
return nil
|
||||
@ -128,7 +128,7 @@ func TestParallelErrorInCollect(t *testing.T) {
|
||||
|
||||
func processSleep(value interface{}) (interface{}, error) {
|
||||
time.Sleep(time.Duration(testProcessSleep) * time.Millisecond)
|
||||
return value.(int), nil
|
||||
return value.(int), nil //nolint:forcetypeassert
|
||||
}
|
||||
|
||||
func collectNil(idx int, value interface{}) error {
|
||||
|
||||
Reference in New Issue
Block a user