Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove repetitive words #11604

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/http/proxy/factory/agent/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func NewTransport(signatureService portainer.DigitalSignatureService, httpTransp
return transport
}

// RoundTrip is the implementation of the the http.RoundTripper interface
// RoundTrip is the implementation of the http.RoundTripper interface
func (transport *Transport) RoundTrip(request *http.Request) (*http.Response, error) {
signature, err := transport.signatureService.CreateSignature(portainer.PortainerAgentSignatureMessage)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion api/http/proxy/factory/azure/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func NewTransport(credentials *portainer.AzureCredentials, dataStore dataservice
}
}

// RoundTrip is the implementation of the the http.RoundTripper interface
// RoundTrip is the implementation of the http.RoundTripper interface
func (transport *Transport) RoundTrip(request *http.Request) (*http.Response, error) {
return transport.proxyAzureRequest(request)
}
Expand Down
2 changes: 1 addition & 1 deletion api/http/proxy/factory/docker/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func NewTransport(parameters *TransportParameters, httpTransport *http.Transport
return transport, nil
}

// RoundTrip is the implementation of the the http.RoundTripper interface
// RoundTrip is the implementation of the http.RoundTripper interface
func (transport *Transport) RoundTrip(request *http.Request) (*http.Response, error) {
return transport.ProxyDockerRequest(request)
}
Expand Down
2 changes: 1 addition & 1 deletion api/http/proxy/factory/gitlab/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func NewTransport() *Transport {
}
}

// RoundTrip is the implementation of the the http.RoundTripper interface
// RoundTrip is the implementation of the http.RoundTripper interface
func (transport *Transport) RoundTrip(request *http.Request) (*http.Response, error) {
token := request.Header.Get("Private-Token")
if token == "" {
Expand Down
2 changes: 1 addition & 1 deletion api/http/proxy/factory/kubernetes/agent_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func NewAgentTransport(signatureService portainer.DigitalSignatureService, tlsCo
return transport
}

// RoundTrip is the implementation of the the http.RoundTripper interface
// RoundTrip is the implementation of the http.RoundTripper interface
func (transport *agentTransport) RoundTrip(request *http.Request) (*http.Response, error) {
token, err := transport.getRoundTripToken(request, transport.tokenManager)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion api/http/proxy/factory/kubernetes/edge_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func NewEdgeTransport(dataStore dataservices.DataStore, signatureService portain
return transport
}

// RoundTrip is the implementation of the the http.RoundTripper interface
// RoundTrip is the implementation of the http.RoundTripper interface
func (transport *edgeTransport) RoundTrip(request *http.Request) (*http.Response, error) {
token, err := transport.getRoundTripToken(request, transport.tokenManager)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion api/http/proxy/factory/kubernetes/local_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func NewLocalTransport(tokenManager *tokenManager, endpoint *portainer.Endpoint,
return transport, nil
}

// RoundTrip is the implementation of the the http.RoundTripper interface
// RoundTrip is the implementation of the http.RoundTripper interface
func (transport *localTransport) RoundTrip(request *http.Request) (*http.Response, error) {
_, err := transport.prepareRoundTrip(request)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion api/http/proxy/factory/kubernetes/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (transport *baseTransport) prepareRoundTrip(request *http.Request) (string,
return token, nil
}

// RoundTrip is the implementation of the the http.RoundTripper interface
// RoundTrip is the implementation of the http.RoundTripper interface
func (transport *baseTransport) RoundTrip(request *http.Request) (*http.Response, error) {
return transport.proxyKubernetesRequest(request)
}
Expand Down
4 changes: 2 additions & 2 deletions api/http/proxy/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func NewManager(dataStore dataservices.DataStore, signatureService portainer.Dig
}
}

// CreateAndRegisterEndpointProxy creates a new HTTP reverse proxy based on environment(endpoint) properties and and adds it to the registered proxies.
// CreateAndRegisterEndpointProxy creates a new HTTP reverse proxy based on environment(endpoint) properties and adds it to the registered proxies.
// It can also be used to create a new HTTP reverse proxy and replace an already registered proxy.
func (manager *Manager) CreateAndRegisterEndpointProxy(endpoint *portainer.Endpoint) (http.Handler, error) {
proxy, err := manager.proxyFactory.NewEndpointProxy(endpoint)
Expand All @@ -45,7 +45,7 @@ func (manager *Manager) CreateAndRegisterEndpointProxy(endpoint *portainer.Endpo
return proxy, nil
}

// CreateAgentProxyServer creates a new HTTP reverse proxy based on environment(endpoint) properties and and adds it to the registered proxies.
// CreateAgentProxyServer creates a new HTTP reverse proxy based on environment(endpoint) properties and adds it to the registered proxies.
// It can also be used to create a new HTTP reverse proxy and replace an already registered proxy.
func (manager *Manager) CreateAgentProxyServer(endpoint *portainer.Endpoint) (*factory.ProxyServer, error) {
return manager.proxyFactory.NewAgentProxy(endpoint)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function HelmRepositoryDatatable() {

useEffect(() => {
// window.location.hash will get everything after the hashbang
// the regex will match the the content after each hash
// the regex will match the content after each hash
const timeout = setTimeout(() => {
const regEx = /#!.*#(.*)/;
const match = window.location.hash.match(regEx);
Expand Down
4 changes: 2 additions & 2 deletions app/react/sidebar/SidebarItem/useSidebarSrefActive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ export function useSidebarSrefActive(
const { state: { name: stateName = '' } = {} } = useCurrentStateAndParams();
const anchorProps = useSrefActive(to, params || {}, activeClassName, options);

// overwrite the className to '' if the the current route is in ignorePaths
// overwrite the className to '' if the current route is in ignorePaths
const isIgnorePathInRoute = pathOptions.ignorePaths?.some((path) =>
stateName.includes(path)
);
if (isIgnorePathInRoute) {
return { ...anchorProps, className: '' };
}

// overwrite the className to activeClassName if the the current route is in includePaths
// overwrite the className to activeClassName if the current route is in includePaths
const isIncludePathInRoute = pathOptions.includePaths?.some((path) =>
stateName.includes(path)
);
Expand Down