hunk.code_window: // Service implements the CLIService interface
   type Service struct{}
   const (
   	errInvalidEnpointProtocol  = portainer.Error("Invalid endpoint protocol: Portainer only supports unix:// or tcp://")
   	errSocketNotFound          = portainer.Error("Unable to locate Unix socket")
   	errEndpointsFileNotFound   = portainer.Error("Unable to locate external endpoints file")
   	errInvalidSyncInterval     = portainer.Error("Invalid synchronization interval")
   	errEndpointExcludeExternal = portainer.Error("Cannot use the -H flag mutually with --external-endpoints")
   )
   // ParseFlags parse the CLI flags and return a portainer.Flags struct
   func (*Service) ParseFlags(version string) (*portainer.CLIFlags, error) {
  
hunk.labels: keep keep keep keep replace replace replace replace replace keep keep keep keep
hunk.after_edit: 	errInvalidEndpointProtocol     = portainer.Error("Invalid endpoint protocol: Portainer only supports unix:// or tcp://")
   	errSocketNotFound              = portainer.Error("Unable to locate Unix socket")
   	errEndpointsFileNotFound       = portainer.Error("Unable to locate external endpoints file")
   	errInvalidSyncInterval         = portainer.Error("Invalid synchronization interval")
   	errEndpointExcludeExternal     = portainer.Error("Cannot use the -H flag mutually with --external-endpoints")
   	errNoAuthExcludeAdminPassword  = portainer.Error("Cannot use --no-auth with --admin-password")
  
hunk.file_path: api/cli/cli.go
hunk.type: replace
file: angular.module('portainer.rest')
  .factory('Users', ['$resource', 'USERS_ENDPOINT', function UsersFactory($resource, USERS_ENDPOINT) {
    'use strict';
    return $resource(USERS_ENDPOINT + '/:id/:action', {}, {
      create: { method: 'POST' },
      query: { method: 'GET', isArray: true },
      get: { method: 'GET', params: { id: '@id' } },
      update: { method: 'PUT', params: { id: '@id' } },
      remove: { method: 'DELETE', params: { id: '@id'} },
      // RPCs should be moved to a specific endpoint
      checkPassword: { method: 'POST', params: { id: '@id', action: 'passwd' } },
      checkAdminUser: { method: 'GET', params: { id: 'admin', action: 'check' }, isArray: true },
      initAdminUser: { method: 'POST', params: { id: 'admin', action: 'init' } }
    });
  }]);
  